.claude/skills/evolve/SKILL.md
Self-improve AI Factory skills based on project context, accumulated patches, and codebase patterns. Analyzes what went wrong, what works, and enhances skills to prevent future issues. Use when you want to make AI smarter for your project.
npx skillsauth add YaroslavKomarov/ShedulerBot ai-factory.evolveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze project context, patches, and codebase to improve existing skills. Makes AI Factory smarter with every run.
patches (past mistakes) + project context + codebase patterns
↓
analyze recurring problems, tech-specific pitfalls, project conventions
↓
enhance skills with project-specific rules, guards, and patterns
Read .ai-factory/DESCRIPTION.md to understand:
1.1: Read all patches
Glob: .ai-factory/patches/*.md
Read every patch. For each one, extract:
1.2: Aggregate patterns
Group patches by tags and categories. Identify:
1.3: Read codebase conventions
Scan the project for patterns:
.eslintrc, phpstan.neon, ruff.toml, etc.)Determine which skills to evolve:
$ARGUMENTS contains a specific skill name → evolve only that skill$ARGUMENTS is "all" or empty → evolve all installed skillsRead each target skill's SKILL.md:
Glob: .claude/skills/*/SKILL.md
If skills are not installed yet (no .claude/skills/), read from source:
Glob: skills/*/SKILL.md
For each skill, identify what's missing based on collected intelligence:
3.1: Patch-driven gaps
Compare patch patterns against skill instructions:
/ai-factory.fix mention the most common error categories from patches? If not → add them/ai-factory.implement warn about the pitfalls found in patches? If not → add guards/ai-factory.task include logging/validation requirements for problem areas? If not → enhance/ai-factory.review check for the patterns that caused bugs? If not → add checklist items3.2: Tech-stack gaps
Compare project tech stack against skill instructions:
3.3: Convention gaps
Compare project conventions against skill instructions:
For each gap found, create a concrete improvement:
## Improvement: [skill-name]
### What
[Specific change to make]
### Why
[Which patches/patterns drove this change]
### Where
[Exact section in SKILL.md to modify]
### Change
[The actual text to add/modify]
Quality rules for improvements:
5.1: Present improvements to user
## Skill Evolution Report
Based on:
- X patches analyzed
- Y recurring patterns found
- Z tech-stack specific insights
### Proposed Improvements
#### /ai-factory.fix
1. **Add null-check guard** — 5 patches involved null references
→ Add to Step 2: "Check for optional/nullable fields before accessing nested properties"
2. **Add async/await pattern** — 3 patches involved unhandled promises
→ Add to Important Rules: "Always use try/catch with async/await"
#### /ai-factory.implement
1. **Add Prisma-specific warning** — 2 patches from incorrect Prisma queries
→ Add to Logging: "Log all Prisma queries in DEBUG mode"
#### /ai-factory.review
1. **Add checklist item** — optional chaining not checked
→ Add to Correctness: "Optional chaining for nullable relations"
Apply these improvements?
- [ ] Yes, apply all
- [ ] Let me pick which ones
- [ ] No, just save the report
5.2: Apply approved improvements
For each approved improvement:
Edit5.3: Save evolution log
Create .ai-factory/evolutions/YYYY-MM-DD-HH.mm.md:
mkdir -p .ai-factory/evolutions
# Evolution: YYYY-MM-DD HH:mm
## Intelligence Summary
- Patches analyzed: X
- Recurring patterns: [list]
- Tech stack: [from DESCRIPTION.md]
## Improvements Applied
### [skill-name]
- [change description] ← driven by patches: [patch filenames]
### [skill-name]
- [change description] ← driven by: [tech stack / convention]
## Patterns Identified
- [pattern]: [frequency] occurrences
- [pattern]: [frequency] occurrences
## Evolution Complete
Skills improved: X
Improvements applied: Y
### Recommendations
1. **Run `/ai-factory.review`** on recent code to verify improvements
2. **Next evolution** — run `/ai-factory.evolve` again after 5-10 more fixes
3. **Consider new skill** — if pattern X keeps recurring, create a dedicated skill:
`/ai-factory.skill-generator <skill-name>`
Context is heavy after reading all patches and skills. All improvements are saved — suggest freeing space:
AskUserQuestion: Free up context before continuing?
Options:
1. /clear — Full reset (recommended)
2. /compact — Compress history
3. Continue as is
| Skill | Learns From | Example Enhancement |
|-------|-------------|---------------------|
| /ai-factory.fix | Patches → common errors | "Check for X before accessing Y" |
| /ai-factory.implement | Patches → prevention rules | "When creating models, always validate Z" |
| /ai-factory.task | Patches → logging gaps | "Add validation task for nullable fields" |
| /ai-factory.review | Patches → missed issues | "Check: are all optional relations null-safe?" |
| /ai-factory.commit | Codebase → conventions | "Use project's commit prefix format" |
| /ai-factory.feature | Codebase → patterns | "Default branch prefix based on project convention" |
/ai-factory.evolve fix
→ Found 6/10 patches tagged #null-check
→ Improvement: Add to /ai-factory.fix Step 2:
"PRIORITY CHECK: Look for optional/nullable fields accessed
without null guards. This is the #1 source of bugs in this project."
→ Improvement: Add to /ai-factory.review checklist:
"- [ ] All nullable DB fields have null checks in UI/API layer"
/ai-factory.evolve all
→ Stack: Laravel + Eloquent (from DESCRIPTION.md)
→ Found 3 patches tagged #n-plus-one #database
→ Improvement: Add to /ai-factory.implement logging:
"Enable query logging: DB::enableQueryLog() in DEBUG mode"
→ Improvement: Add to /ai-factory.review checklist:
"- [ ] Eager loading used for related models (no N+1)"
→ Improvement: Add to /ai-factory.task descriptions:
"Include 'use ->with() for relations' in DB-related tasks"
/ai-factory.evolve
→ No patches found (first run)
→ Analyzing project context only...
→ Stack: Next.js 14 + Prisma + TypeScript
→ Improvement: Add to /ai-factory.implement:
"Use server actions for mutations, API routes for external APIs"
→ Improvement: Add to /ai-factory.fix:
"For Prisma errors, check schema.prisma for field types first"
→ Improvement: Add to /ai-factory.review:
"- [ ] Server components don't use client-only hooks"
/ai-factory.skill-generator instead)development
Verify completed implementation against the plan. Checks that all tasks were fully implemented, nothing was forgotten, code compiles, tests pass, and quality standards are met. Use after "/ai-factory.implement" completes, or when user says "verify", "check work", "did we miss anything".
data-ai
Create a step-by-step implementation plan for a feature or task. Breaks down work into actionable tasks tracked via the task system. Use when user says "plan", "create tasks", "break down", or "make a plan for".
tools
# Supabase TypeScript Patterns Patterns for using Supabase with TypeScript in this project. Uses **service role key** (server-side only). Tables are prefixed `sch_`. ## Client Setup ```typescript // src/db/client.ts import { createClient } from "@supabase/supabase-js"; import type { Database } from "./types"; // generated types export const supabase = createClient<Database>( process.env.SUPABASE_URL!, process.env.SUPABASE_SERVICE_ROLE_KEY!, // server-side only, bypasses RLS { auth:
development
Generate professional Agent Skills for Claude Code and other AI agents. Creates complete skill packages with SKILL.md, references, scripts, and templates. Use when creating new skills, generating custom slash commands, or building reusable AI capabilities. Validates against Agent Skills specification.