Adding tests in new files instead of existing ones
Not running the full test suite before committing
1---2name: composiohq-composio-bug-fixing-guide3description: Bug Fixing Guide4---5# Bug Fixing Guide67Standard practices for fixing bugs in Composio SDK. Always add regression tests for major bugs.89## Bug Fix Process1011### 1. Understand the Bug1213- **Reproduce the issue** - Create a minimal reproduction case14- **Identify root cause** - Debug and trace the issue to its source15- **Check existing tests** - See if tests exist for the affected code16- **Review related code** - Check for similar issues elsewhere1718### 2. Fix the Bug1920- **Implement the fix** - Make minimal changes to address the root cause21- **Avoid scope creep** - Don't refactor unrelated code22- **Follow coding standards** - Maintain consistency with existing code23- **Test locally** - Verify the fix works as expected2425### 3. Verify the Fix (Quick Functional Testing)2627**Optional but Recommended:** Test actual functionality before adding unit tests.2829For bugs affecting framework integrations or real-world usage:3031- Use **ephemeral E2E tests** to quickly verify the fix works end-to-end32- Read `ephemeral-e2e-sdk-tests` skill for quick verification setup33- Test in `.agent_cache/test-<bug-description>` (never commit these)34- Example: `.agent_cache/test-fix-openai-tool-execution`3536### 4. Add Regression Tests (Required for Major Bugs)3738**Critical:** For major bugs, always add tests to prevent regressions.3940See `.claude/rules/bug-fix-testing.mdc` for detailed testing requirements:4142- Where to add tests (TypeScript: `ts/packages/<package>/test/`, Python: `python/tests/`)43- How to structure tests (Vitest for TS, pytest for Python)44- Test naming conventions and patterns45- Mocking strategies4647**Key Points:**4849- Add tests to **existing test files** for the affected feature50- Tests should **fail before the fix** and **pass after**51- Cover edge cases related to the bug52- Run tests before committing: `pnpm test` (TS) or `make tst` (Python)5354### 5. Document the Fix5556- **Clear commit message** - Describe what was fixed and why57- **Reference issues** - Link to GitHub issues or tickets58- **Update docs** - If the bug exposed unclear documentation59- **Add comments** - Explain non-obvious fixes in the code6061## When to Add Tests6263**Always add tests for:**6465- Logic errors and incorrect behavior66- Edge cases and boundary conditions67- Race conditions and async issues68- Security vulnerabilities69- Data corruption or loss issues7071**Consider tests for:**7273- Type errors (if not caught by TypeScript/mypy)74- Minor UI/UX issues75- Performance optimizations7677**May skip tests for:**7879- Trivial typo fixes in comments/docs80- Formatting or linting issues8182## Testing Resources8384- **Quick verification**: Read `ephemeral-e2e-sdk-tests` skill (test in `.agent_cache/`)85- **Full testing guidelines**: `.claude/rules/bug-fix-testing.mdc`86- **TypeScript tests**: `ts/packages/<package>/test/`87- **Python tests**: `python/tests/`88- **E2E tests**: `ts/e2e-tests/` (for runtime compatibility issues)8990## Common Pitfalls9192- Fixing symptoms instead of root cause93- Not adding regression tests for major bugs94- Breaking existing tests without updating them95- Adding tests in new files instead of existing ones96- Not running the full test suite before committing
Run npx skillmds@latest add tuyv/composiohq-composio-bug-fixing-guide in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Bug Fixing Guide It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tuyv (@tuyv) published this skill. Their other Agent Skills are listed on their SkillMD profile.