.cursorrules (deprecated)
.cursorrules.cursorrulesroot
Quality
96/100
Scores the file, not the repository.Length
1,320 words
56 headings · 13 code blocksRepository
51
— · pushed 168 days agoLast changed
2 days ago
First indexed 2 days ago.1# Cursor Rules for skene-cookbook23## Project Context45**Repository:** skene-cookbook - 764 AI skill library with 36 skill chain recipes6**Package:** @skene/skills-directory v0.2.07**License:** MIT8**Purpose:** Pre-built AI skill chains for PLG, sales, customer success, security, and more910## Architecture Patterns1112### Skill Structure (Non-Negotiable)1314Every skill MUST follow this exact structure:1516```17skills-library/{domain}/{skill-name}/18├── skill.json # Metadata (name, description, category, risk_level)19├── instructions.md # AI agent execution instructions20└── tests/ # Optional: skill-specific tests21```2223**Do NOT:**24- Create skills outside `skills-library/executable/` or `skills-library/reference/`25- Modify existing skill structure without updating registry26- Add skills without `skill.json` and `instructions.md`2728### Registry Auto-Generation2930The `registry/` directory is AUTO-GENERATED from `skills-library/`:31- Never manually edit files in `registry/`32- Always run `npm run verify:metrics` after skill changes33- Registry regeneration syncs badges and counts across README.md, METRICS.md, docs/directory.md3435### Risk Level Classification3637Skills are classified by risk level (defined in `skill.json`):38- `Low` - Read-only operations, no external dependencies39- `Medium` - Write operations, requires configuration40- `High` - External API calls, requires credentials41- `Critical` - System-level operations, requires manual review4243**Rule:** When creating a skill that makes external API calls, uses credentials, or modifies data, always set `risk_level: "High"` or `"Critical"`.4445## Naming Conventions4647### Skill IDs48- Format: `{domain}_{action}_{target}` (e.g., `sales_analyze_pipeline`)49- Use snake_case, all lowercase50- Be descriptive but concise (3-5 words max)5152### File Naming53- Skill directories: kebab-case (e.g., `analyze-customer-health/`)54- Python files: snake_case (e.g., `analyze_skills.py`)55- JavaScript files: kebab-case (e.g., `skills-directory.js`)56- Documentation: SCREAMING_SNAKE_CASE for top-level (e.g., `AGENTS.md`), kebab-case for nested5758### Domain Categories5960Valid domains (don't invent new ones without discussion):61- `ecosystem` - Partner, integration management62- `marketing` - Campaigns, content, SEO63- `sales` - Pipeline, deals, CRM64- `customer_success` - Health, churn, onboarding65- `product_ops` - Roadmap, releases66- `security` - Security, compliance67- `finops` - Billing, revenue68- `data` - Analytics, reporting69- `engineering` - DevOps, CI/CD70- `hr` - Recruiting, onboarding7172## Testing Patterns7374### Test Organization7576```77tests/78├── unit/ # Fast, isolated tests (< 1s each)79├── integration/ # Multi-component tests (< 5s each)80└── e2e/ # Full user workflows (< 30s each)81```8283### Required Test Coverage8485- Minimum: 60% overall coverage86- Target: 80%+ coverage87- Critical paths (eval_harness, tracer): 90%+ coverage8889### Testing Commands9091```bash92# Run full suite93pytest tests/ -v9495# Run fast tests only96pytest tests/unit -v -m "not slow"9798# Run specific domain tests99pytest tests/unit/test_dedupe_skills.py -v100```101102**Rule:** All PRs must pass `pytest tests/ -v` before merging.103104## Code Quality Standards105106### Pre-Commit Hooks (Enforced)107108The following hooks run automatically on commit:109- `detect-secrets` - Blocks commits with credentials110- `prettier` - Formats JS/JSON/YAML/Markdown111- `black` - Formats Python (if installed)112- `flake8` - Lints Python (if installed)113- `isort` - Sorts Python imports (if installed)114115**Rule:** Never use `--no-verify` to skip hooks. Fix the issues instead.116117### Linting Commands118119```bash120# JavaScript121npm run lint # ESLint + Prettier122npm run format # Auto-fix formatting123124# Python (if installed in venv)125black .126flake8 .127isort .128```129130## Workflow Blueprints131132### Blueprint Schema133134Blueprints in `registry/blueprints/` follow `schemas/workflow_blueprint.json`:135136```yaml137id: workflow_{name}138version: 1.0.0139name: 'Human Readable Name'140chain_sequence:141 - step_id: 'step_1'142 skill_id: 'domain_action_target'143 action: 'action_name'144 input_mapping:145 static_values: {}146 error_handling:147 on_failure: 'stop'148 max_retries: 2149```150151**Rule:** All workflow blueprints must validate against schema before committing.152153## Playbook-Ready Features (Optional but Encouraged)154155When creating blueprints, consider adding:156157```yaml158icp:159 company_size: '50-500'160 motion: 'product-led-growth'161 priorities: ['reduce_churn', 'increase_nrr']162163integration_reference:164 - type: 'crm'165 provider: 'salesforce'166 schema_ref: 'registry/integration_schemas/salesforce_fields.yaml'167168opinionated_prompts:169 - step_id: 'step_1'170 system_context: 'You are analyzing a PLG motion with 30-day trials...'171 input_guidance: 'Focus on trial-to-paid conversion metrics...'172```173174See `registry/integration_schemas/README.md` for schema format.175176## Security Rules (Blocking)177178### Never Commit179180These patterns are BLOCKED by pre-commit hooks:181- `.env` files (use `.env.example` for templates)182- Files in `.ssh/`, `.aws/`, `secrets/`183- Private keys (detected by `detect-private-key` hook)184- API keys, tokens, passwords (detected by `detect-secrets`)185186### Handling Credentials187188```bash189# Good: Reference environment variables190DATABASE_URL = os.getenv('DATABASE_URL')191192# Bad: Hardcoded credentials193DATABASE_URL = "postgresql://user:pass@localhost" # pragma: allowlist secret194```195196## AI Agent Boundaries197198### What AI Agents Can Access199200- All files except `.ai/internal/` (gitignored, excluded in `.cursorignore`)201- `AGENTS.md` for build commands and conventions202- All skill schemas in `skills-library/`203- Test suites in `tests/`204205### What AI Agents Should NOT Touch206207- `skills-library/` content (764 skills, managed by scripts)208- `registry/` (auto-generated)209- `METRICS.md` (auto-generated)210211**Rule:** If you modify skill counts or categories, run `npm run verify:metrics` to sync all dependent files.212213## Development Workflow214215### Adding a New Skill2162171. Create directory: `skills-library/executable/{domain}/{skill-name}/`2182. Write `skill.json` (follow schema in `schemas/skill_definition.json`)2193. Write `instructions.md` (clear execution steps)2204. Run `npm run verify:metrics` to update registry2215. Add tests in `tests/` if complex logic2226. Run `pytest tests/ -v` to verify2237. Commit with message: `feat(skills): add {skill-name} to {domain}`224225### Modifying Existing Skills2262271. Read the skill's `skill.json` and `instructions.md` first2282. Make changes2293. Run `npm run verify:metrics`2304. Update tests if behavior changed2315. Run `pytest tests/ -v`2326. Commit with message: `fix(skills): update {skill-name} - {reason}`233234### Creating Skill Chains2352361. Identify 2-7 skills to chain together2372. Create blueprint in `registry/blueprints/` (or use script: `scripts/recipe_to_blueprint.py`)2383. Validate against `schemas/workflow_blueprint.json`2394. Document in `docs/SKILL_CHAINS.md` (follow existing format)2405. Add integration test in `tests/integration/`2416. Commit with message: `feat(chains): add {chain-name} recipe`242243## Performance Guidelines244245### Skill Execution246247- Keep skills atomic (single responsibility)248- Skills should complete in < 5 seconds (unless marked with `slow: true`)249- Use caching for expensive operations (see `eval_harness/tracer.py` for examples)250251### Testing Performance252253- Unit tests: < 1 second each254- Integration tests: < 5 seconds each255- E2E tests: < 30 seconds each256- Mark slow tests with `@pytest.mark.slow`257258## Common Patterns259260### Skill Chaining (Data Flow)261262Skills output data that becomes input for next skill:263264```yaml265- step_id: 'analyze'266 skill_id: 'sales_analyze_pipeline'267 output: { health_score: 0.85 }268269- step_id: 'recommend'270 skill_id: 'sales_recommend_actions'271 input_mapping:272 from_step: 'analyze'273 field_mappings:274 health_score: 'input.score'275```276277### Error Handling278279```yaml280error_handling:281 on_failure: 'stop' # Options: stop, continue, retry282 max_retries: 2283 retry_delay_seconds: 5284```285286## Commit Message Format287288Follow Conventional Commits:289290```291<type>(<scope>): <subject>292293<body>294295<footer>296```297298**Types:**299- `feat` - New feature (skill, chain, tool)300- `fix` - Bug fix301- `docs` - Documentation only302- `refactor` - Code refactoring (no behavior change)303- `test` - Adding or updating tests304- `chore` - Maintenance (deps, config, etc.)305306**Examples:**307```308feat(skills): add customer health scoring to customer_success domain309fix(chains): correct data mapping in sales pipeline workflow310docs(agents): update AGENTS.md with eval harness instructions311```312313## Quick Reference Commands314315```bash316# Setup317npm ci318319# Testing320pytest tests/ -v # All tests321pytest tests/unit -v -m "not slow" # Fast unit tests322pytest tests/integration -v # Integration tests323324# Quality325npm run lint # ESLint + Prettier326npm run format # Auto-fix formatting327npm run verify:metrics # Sync skill counts/badges328329# Pre-release330bash scripts/pre_release_check.sh # Comprehensive check331332# Pre-commit333pre-commit run --all-files # Run all hooks334```335336## Questions or Unclear Patterns?337338- Read `AGENTS.md` for build commands and testing workflows339- Read `CONTRIBUTING.md` for contribution guidelines340- Read `ARCHITECTURE.md` for design details341- Check existing skills in `skills-library/` for examples342- See `docs/SKILL_CHAINS.md` for 36 ready-to-use recipes343344## AI Agent Execution Context345346When executing code:347- Use `source .venv/bin/activate` for Python commands348- Use `npm ci` for fresh dependency install349- Always run tests before committing: `pytest tests/ -v`350- Check `git status` before and after operations351- Use `npm run verify:metrics` after skill changes352353## Emergency Commands354355If something breaks:356357```bash358# Reset to clean state359git status360git restore .361git clean -fd362363# Rebuild registry364npm run verify:metrics365366# Reinstall dependencies367rm -rf node_modules .venv368npm ci369python3 -m venv .venv370source .venv/bin/activate371pip install -r requirements-dev.txt # if exists372```373374---375376**Last Updated:** 2026-02-15 (v0.2.0 - Open Source Release)377**Maintained By:** Skene Technologies (opensource@skene.ai)378
Also in SkeneTechnologies/skene-cookbook
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bashdeban/fastmind.cursorrules · 5 | .cursorrules | buildtestlint-formattypes+5 | 81/100 | 3 days ago | |
| forem/forem.cursorrules · 23k | .cursorrules | teststyletypesdatabase+4 | 71/100 | 3 days ago | |
| wodsmith/thewodapp.cursorrules · 2 | .cursorrules | testlint-formatstylearch+4 | 64/100 | 3 days ago | |
| abpframework/abp.cursorrules · 14k | .cursorrules | teststylegitsecurity+3 | 55/100 | 2 days ago | |
| Kabi10/cursor-rules.cursorrules · 21 | .cursorrules | do-notagent-behaviour | 52/100 | 3 days ago | |
| sportiz91/vibe-template.cursorrules · 9 | .cursorrules | stylearchsecuritydo-not+1 | 49/100 | 3 days ago | |
| sferg989/fergfo.om.cursorrules · 0 | .cursorrules | do-not | 49/100 | 3 days ago | |
| Kele-Bingtang/teek-design-vue3.cursorrules · 273 | .cursorrules | lint-formatuidocs | 48/100 | 3 days ago |
