create-rule
Create Cursor rules for persistent AI guidance. Use when the user wants to create a rule, add coding standards, set up project…
Use when asked to generate tests for a file, module or component, to raise coverage, or to bootstrap a suite for untested code. Detects the project's test framework and conventions first, then writes unit, integration and edge-case tests.
Claude Code
$ npx -y skills add coco-research/coco --skill generate-tests --agent claude-code
Codex
$ npx skills add coco-research/coco --skill generate-tests -a codex -y
Cursor
$ npx skills add coco-research/coco --skill generate-tests -a cursor -y
Gemini CLI
$ npx skills add coco-research/coco --skill generate-tests -a gemini-cli -y
GitHub Copilot
$ npx skills add coco-research/coco --skill generate-tests -a github-copilot -y
OpenCode
$ npx skills add coco-research/coco --skill generate-tests -a opencode -y
Windsurf
$ npx skills add coco-research/coco --skill generate-tests -a windsurf -y
name: generate-tests description: "Use when asked to generate tests for a file, module or component, to raise coverage, or to bootstrap a suite for untested code. Detects the project's test framework and conventions first, then writes unit, integration and edge-case tests." domain: engineering supports: [claude-code, cursor, codex, generic] version: 0.1.0
Generate complete test coverage for any file, component, or module. Covers unit tests, integration tests, edge cases, error handling, and mocking — adapted to whatever testing framework the project uses.
**Use when**: you want tests generated for a file or component, need to improve test coverage, want edge case coverage, need mocks for external dependencies, or want to bootstrap a test suite for untested code.
---
Follow every step below. Do NOT generate tests without first analyzing the project's testing setup and the target code.
---
Before writing any tests, discover the project's testing conventions:
1. **Find the test framework** — Check `package.json` (dependencies/scripts), or config files:
2. **Find existing test files** — Search for `*.test.*`, `*.spec.*`, `test_*.py`, `*_test.go` to understand naming conventions and patterns already in use.
3. **Check for test utilities** — Look for shared helpers, factories, custom matchers, or mock setups the project already provides (e.g., `test/utils.ts`, `__mocks__/`, `conftest.py`).
4. **Check the test script** — Read the `test` script in `package.json` (or equivalent) to understand how tests are run, what flags are used, and what coverage tool is configured.
**Match the project's existing conventions exactly.** File naming, import style, assertion style, describe/it vs test, etc.
---
Read the file or component the user wants tested. Identify:
---
Before writing code, outline what you'll test:
---
Follow these principles:
describe("[ModuleName]", () => {
describe("[functionName]", () => {
it("should [expected behavior] when [condition]", () => {
// Arrange
// Act
// Assert
});
});
});| Framework | Component Testing | Key Patterns | |-----------|------------------|--------------| | **React** | React Testing Library | `render()`, `screen.getByRole()`, `userEvent`, `waitFor` | | **Vue** | Vue Test Utils | `mount()`, `shallowMount()`, `wrapper.find()`, `trigger()` | | **Angular** | TestBed | `TestBed.configureTestingModule()`, `fixture.detectChanges()` | | **Node.js** | Supertest | `request(app).get("/api/...").expect(200)` | | **Python** | pytest | `@pytest.fixture`, `monkeypatch`, parametrize | | **Go** | testing | `t.Run()`, table-driven tests, `t.Parallel()` |
---
After generating the tests:
1. **Run the tests** — Execute the test suite to make sure they pass 2. **Check coverage** — Identify untested lines or branches 3. **Add missing cases** — Fill gaps in coverage, especially error paths 4. **Review test quality** — Tests should fail when the code breaks, not just when the tests break
| Priority | Coverage Target | |----------|----------------| | Critical business logic | 90%+ | | Utility f
495 personas across 13 departments, 229 skills[^installed] and 388 commands in the full catalog (coco 1.9.0, 2026-10-21). Agent skills, slash commands and subagents for Claude Code, Cursor, Codex and other AI coding agents.
Create Cursor rules for persistent AI guidance. Use when the user wants to create a rule, add coding standards, set up project…
Guides users through creating effective Agent Skills for Cursor. Use when the user wants to create, write, or author a new skill,…
Create custom subagents for specialized AI tasks. Use when the user wants to create a new type of subagent, set up task-specific…
Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills…
Modify Cursor/VSCode user settings in settings.json. Use when the user wants to change editor settings, preferences,…
Train and optimize AI agents using Microsoft's Agent Lightning framework with reinforcement learning. Use when setting up agent…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.