Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
Fix agent skills, add bug fixing guidelines (#2549)
Musthaq Ahamad7da71f884a3a
diff --git a/.claude/skills/bug-fixing-guide/SKILL.md b/.claude/skills/bug-fixing-guide/SKILL.mdnew file mode 100644index 000000000..c6102b73f--- /dev/null+++ b/.claude/skills/bug-fixing-guide/SKILL.md@@ -0,0 +1,92 @@+# Bug Fixing Guide++Standard practices for fixing bugs in Composio SDK. Always add regression tests for major bugs.++## Bug Fix Process++### 1. Understand the Bug++- **Reproduce the issue** - Create a minimal reproduction case+- **Identify root cause** - Debug and trace the issue to its source+- **Check existing tests** - See if tests exist for the affected code+- **Review related code** - Check for similar issues elsewhere++### 2. Fix the Bug++- **Implement the fix** - Make minimal changes to address the root cause+- **Avoid scope creep** - Don't refactor unrelated code+- **Follow coding standards** - Maintain consistency with existing code+- **Test locally** - Verify the fix works as expected++### 3. Verify the Fix (Quick Functional Testing)++**Optional but Recommended:** Test actual functionality before adding unit tests.++For bugs affecting framework integrations or real-world usage:++- Use **ephemeral E2E tests** to quickly verify the fix works end-to-end+- Read `ephemeral-e2e-sdk-tests` skill for quick verification setup+- Test in `.agent_cache/test-<bug-description>` (never commit these)+- Example: `.agent_cache/test-fix-openai-tool-execution`++### 4. Add Regression Tests (Required for Major Bugs)++**Critical:** For major bugs, always add tests to prevent regressions.++See `.claude/rules/bug-fix-testing.mdc` for detailed testing requirements:++- Where to add tests (TypeScript: `ts/packages/<package>/test/`, Python: `python/tests/`)+- How to structure tests (Vitest for TS, pytest for Python)+- Test naming conventions and patterns+- Mocking strategies++**Key Points:**++- Add tests to **existing test files** for the affected feature+- Tests should **fail before the fix** and **pass after**+- Cover edge cases related to the bug+- Run tests before committing: `pnpm test` (TS) or `make tst` (Python)++### 5. Document the Fix++- **Clear commit message** - Describe what was fixed and why+- **Reference issues** - Link to GitHub issues or tickets+- **Update docs** - If the bug exposed unclear documentation+- **Add comments** - Explain non-obvious fixes in the code++## When to Add Tests++**Always add tests for:**++- Logic errors and incorrect behavior+- Edge cases and boundary conditions+- Race conditions and async issues+- Security vulnerabilities+- Data corruption or loss issues++**Consider tests for:**++- Type errors (if not caught by TypeScript/mypy)+- Minor UI/UX issues+- Performance optimizations++**May skip tests for:**++- Trivial typo fixes in comments/docs+- Formatting or linting issues++## Testing Resources++- **Quick verification**: Read `ephemeral-e2e-sdk-tests` skill (test in `.agent_cache/`)+- **Full testing guidelines**: `.claude/rules/bug-fix-testing.mdc`+- **TypeScript tests**: `ts/packages/<package>/test/`+- **Python tests**: `python/tests/`+- **E2E tests**: `ts/e2e-tests/` (for runtime compatibility issues)++## Common Pitfalls++- Fixing symptoms instead of root cause+- Not adding regression tests for major bugs+- Breaking existing tests without updating them+- Adding tests in new files instead of existing ones+- Not running the full test suite before committingdiff --git a/.claude/skills/ephemeral-e2e-sdk-tests/SKILL.md b/.claude/skills/ephemeral-e2e-sdk-tests/SKILL.mdnew file mode 100644index 000000000..8c0b402a3--- /dev/null+++ b/.claude/skills/ephemeral-e2e-sdk-tests/SKILL.md@@ -0,0 +1,49 @@+# Ephemeral E2E SDK Tests++Quick ephemeral verification tests for Composio SDK with AI frameworks. Never commit these tests.++## Important Distinction++- **Ephemeral tests** (this skill): Quick verification in `.agent_cache/test-<usecase>` - never committed+- **Actual E2E tests that run in CI**: Use `ts/e2e-tests/` - committed to repository++## Quick Setup++```bash+# Use descriptive usecase names (e.g., openai-direct-tools, vercel-tool-router, anthropic-mcp)+TEST_DIR=".agent_cache/test-<usecase>"+mkdir -p "$TEST_DIR" && cd "$TEST_DIR"+npm init -y+npm install @composio/core # Add framework-specific packages as needed+```++## What to Test++- **Direct Tools (Non-Agentic)**: SDK integration with AI frameworks without Tool Router+- **Tool Router (Agentic)**: User-isolated sessions with Tool Router+- **MCP Integration**: MCP protocol compatibility+- **Framework Compatibility**: Different AI frameworks (OpenAI, Vercel, Anthropic, etc.)++## Implementation Examples++For implementation examples, refer to existing skills:++- **Tool Router basics**: Read `building-agents` skill+- **OpenAI integration**: Read `building-agents-using-openai` skill+- **Vercel AI SDK**: Read `building-agents-using-vercel` skill+- **Anthropic**: Read `building-agents-using-anthropic` skill+- **LangChain**: Read `building-agents-using-langchain` skill+- **Other frameworks**: Check respective `building-agents-using-*` skills++## Clean Up++```bash+cd .. && rm -rf "$TEST_DIR"+```++## Best Practices++- **Always use .agent_cache** - These are ephemeral, never commit+- **For CI E2E tests** - Use `ts/e2e-tests/` instead (see `ts/e2e-tests/README.md`)+- **Use non-auth apps** - HackerNews, Public APIs for quick testing+- **Report critical issues** - Add proper test cases to `ts/e2e-tests/` if needed