@devries-cameron20 / composio-1 / commits / 7da71f884
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Fix agent skills, add bug fixing guidelines (#2549)

Musthaq Ahamad committed Feb 2, 2026 at 12:26 UTC 7da71f884a3a528273453c4a41f4d62f551c5c0b
2 files changed +141
.claude/skills/bug-fixing-guide/SKILL.md new
+92
@@ -0,0 +1,92 @@
1 +# Bug Fixing Guide
2 +
3 +Standard practices for fixing bugs in Composio SDK. Always add regression tests for major bugs.
4 +
5 +## Bug Fix Process
6 +
7 +### 1. Understand the Bug
8 +
9 +- **Reproduce the issue** - Create a minimal reproduction case
10 +- **Identify root cause** - Debug and trace the issue to its source
11 +- **Check existing tests** - See if tests exist for the affected code
12 +- **Review related code** - Check for similar issues elsewhere
13 +
14 +### 2. Fix the Bug
15 +
16 +- **Implement the fix** - Make minimal changes to address the root cause
17 +- **Avoid scope creep** - Don't refactor unrelated code
18 +- **Follow coding standards** - Maintain consistency with existing code
19 +- **Test locally** - Verify the fix works as expected
20 +
21 +### 3. Verify the Fix (Quick Functional Testing)
22 +
23 +**Optional but Recommended:** Test actual functionality before adding unit tests.
24 +
25 +For bugs affecting framework integrations or real-world usage:
26 +
27 +- Use **ephemeral E2E tests** to quickly verify the fix works end-to-end
28 +- Read `ephemeral-e2e-sdk-tests` skill for quick verification setup
29 +- Test in `.agent_cache/test-<bug-description>` (never commit these)
30 +- Example: `.agent_cache/test-fix-openai-tool-execution`
31 +
32 +### 4. Add Regression Tests (Required for Major Bugs)
33 +
34 +**Critical:** For major bugs, always add tests to prevent regressions.
35 +
36 +See `.claude/rules/bug-fix-testing.mdc` for detailed testing requirements:
37 +
38 +- Where to add tests (TypeScript: `ts/packages/<package>/test/`, Python: `python/tests/`)
39 +- How to structure tests (Vitest for TS, pytest for Python)
40 +- Test naming conventions and patterns
41 +- Mocking strategies
42 +
43 +**Key Points:**
44 +
45 +- Add tests to **existing test files** for the affected feature
46 +- Tests should **fail before the fix** and **pass after**
47 +- Cover edge cases related to the bug
48 +- Run tests before committing: `pnpm test` (TS) or `make tst` (Python)
49 +
50 +### 5. Document the Fix
51 +
52 +- **Clear commit message** - Describe what was fixed and why
53 +- **Reference issues** - Link to GitHub issues or tickets
54 +- **Update docs** - If the bug exposed unclear documentation
55 +- **Add comments** - Explain non-obvious fixes in the code
56 +
57 +## When to Add Tests
58 +
59 +**Always add tests for:**
60 +
61 +- Logic errors and incorrect behavior
62 +- Edge cases and boundary conditions
63 +- Race conditions and async issues
64 +- Security vulnerabilities
65 +- Data corruption or loss issues
66 +
67 +**Consider tests for:**
68 +
69 +- Type errors (if not caught by TypeScript/mypy)
70 +- Minor UI/UX issues
71 +- Performance optimizations
72 +
73 +**May skip tests for:**
74 +
75 +- Trivial typo fixes in comments/docs
76 +- Formatting or linting issues
77 +
78 +## Testing Resources
79 +
80 +- **Quick verification**: Read `ephemeral-e2e-sdk-tests` skill (test in `.agent_cache/`)
81 +- **Full testing guidelines**: `.claude/rules/bug-fix-testing.mdc`
82 +- **TypeScript tests**: `ts/packages/<package>/test/`
83 +- **Python tests**: `python/tests/`
84 +- **E2E tests**: `ts/e2e-tests/` (for runtime compatibility issues)
85 +
86 +## Common Pitfalls
87 +
88 +- Fixing symptoms instead of root cause
89 +- Not adding regression tests for major bugs
90 +- Breaking existing tests without updating them
91 +- Adding tests in new files instead of existing ones
92 +- Not running the full test suite before committing
.claude/skills/ephemeral-e2e-sdk-tests/SKILL.md new
+49
@@ -0,0 +1,49 @@
1 +# Ephemeral E2E SDK Tests
2 +
3 +Quick ephemeral verification tests for Composio SDK with AI frameworks. Never commit these tests.
4 +
5 +## Important Distinction
6 +
7 +- **Ephemeral tests** (this skill): Quick verification in `.agent_cache/test-<usecase>` - never committed
8 +- **Actual E2E tests that run in CI**: Use `ts/e2e-tests/` - committed to repository
9 +
10 +## Quick Setup
11 +
12 +```bash
13 +# Use descriptive usecase names (e.g., openai-direct-tools, vercel-tool-router, anthropic-mcp)
14 +TEST_DIR=".agent_cache/test-<usecase>"
15 +mkdir -p "$TEST_DIR" && cd "$TEST_DIR"
16 +npm init -y
17 +npm install @composio/core # Add framework-specific packages as needed
18 +```
19 +
20 +## What to Test
21 +
22 +- **Direct Tools (Non-Agentic)**: SDK integration with AI frameworks without Tool Router
23 +- **Tool Router (Agentic)**: User-isolated sessions with Tool Router
24 +- **MCP Integration**: MCP protocol compatibility
25 +- **Framework Compatibility**: Different AI frameworks (OpenAI, Vercel, Anthropic, etc.)
26 +
27 +## Implementation Examples
28 +
29 +For implementation examples, refer to existing skills:
30 +
31 +- **Tool Router basics**: Read `building-agents` skill
32 +- **OpenAI integration**: Read `building-agents-using-openai` skill
33 +- **Vercel AI SDK**: Read `building-agents-using-vercel` skill
34 +- **Anthropic**: Read `building-agents-using-anthropic` skill
35 +- **LangChain**: Read `building-agents-using-langchain` skill
36 +- **Other frameworks**: Check respective `building-agents-using-*` skills
37 +
38 +## Clean Up
39 +
40 +```bash
41 +cd .. && rm -rf "$TEST_DIR"
42 +```
43 +
44 +## Best Practices
45 +
46 +- **Always use .agent_cache** - These are ephemeral, never commit
47 +- **For CI E2E tests** - Use `ts/e2e-tests/` instead (see `ts/e2e-tests/README.md`)
48 +- **Use non-auth apps** - HackerNews, Public APIs for quick testing
49 +- **Report critical issues** - Add proper test cases to `ts/e2e-tests/` if needed