.claude/skills/implement/SKILL.md
Execute implementation tasks from the current plan. Works through tasks sequentially, marks completion, and preserves progress for continuation across sessions. Use when user says "implement", "start coding", "execute plan", or "continue implementation".
npx skillsauth add YaroslavKomarov/ShedulerBot ai-factory.implementInstall 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.
Execute tasks from the plan, track progress, and enable session continuation.
FIRST: Determine what state we're in:
1. Check for uncommitted changes (git status)
2. Check for plan files (.ai-factory/PLAN.md or branch-named)
3. Check current branch
If uncommitted changes exist:
You have uncommitted changes. Commit them first?
- [ ] Yes, commit now (/ai-factory.commit)
- [ ] No, stash and continue
- [ ] Cancel
If NO plan file exists (all tasks completed or fresh start):
No active plan found.
Current branch: feature/user-auth
What would you like to do?
- [ ] Start new feature from current branch
- [ ] Return to main/master and start new feature
- [ ] Create quick task plan (no branch)
- [ ] Nothing, just checking status
Based on choice:
/ai-factory.feature <description>git checkout main && git pull → /ai-factory.feature <description>/ai-factory.task <description>If plan file exists → continue to Step 0.1
Read .ai-factory/DESCRIPTION.md if it exists to understand:
Read all patches from .ai-factory/patches/ if the directory exists:
Glob to find all *.md files in .ai-factory/patches/Use this context when implementing:
Check for plan files in this order:
1. .ai-factory/PLAN.md exists? → Use it (direct /ai-factory.task call)
2. No .ai-factory/PLAN.md → Check current git branch:
git branch --show-current
→ Look for .ai-factory/features/<branch-name>.md (e.g., .ai-factory/features/feature-user-auth.md)
Priority:
.ai-factory/PLAN.md - always takes priority (from direct /ai-factory.task)/ai-factory.feature)Read the plan file to understand:
TaskList → Get all tasks with status
Find:
## Implementation Progress
✅ Completed: 3/8 tasks
🔄 In Progress: Task #4 - Implement search service
⏳ Pending: 4 tasks
Current task: #4 - Implement search service
For each task:
3.1: Fetch full details
TaskGet(taskId) → Get description, files, context
3.2: Mark as in_progress
TaskUpdate(taskId, status: "in_progress")
3.3: Implement the task
3.4: Verify implementation
3.5: Mark as completed
TaskUpdate(taskId, status: "completed")
3.6: Update checkbox in plan file
IMMEDIATELY after completing a task, update the checkbox in the plan file:
# Before
- [ ] Task 1: Create user model
# After
- [x] Task 1: Create user model
This is MANDATORY — checkboxes must reflect actual progress:
Edit tool to change - [ ] to - [x]3.7: Update .ai-factory/DESCRIPTION.md if needed
If during implementation:
→ Update .ai-factory/DESCRIPTION.md to reflect the change:
## Tech Stack
- **Cache:** Redis (added for session storage)
This keeps .ai-factory/DESCRIPTION.md as the source of truth.
3.8: Check for commit checkpoint
If the plan has commit checkpoints and current task is at a checkpoint:
✅ Tasks 1-4 completed.
This is a commit checkpoint. Ready to commit?
Suggested message: "feat: add base models and types"
- [ ] Yes, commit now (/ai-factory.commit)
- [ ] No, continue to next task
- [ ] Skip all commit checkpoints
3.9: Move to next task or pause
Progress is automatically saved via TaskUpdate.
To pause:
Current progress saved.
Completed: 4/8 tasks
Next task: #5 - Add pagination support
To resume later, run:
/ai-factory.implement
To resume (next session):
/ai-factory.implement
→ Automatically finds next incomplete task
When all tasks are done:
## Implementation Complete
All 8 tasks completed.
Branch: feature/product-search
Plan file: .ai-factory/features/feature-product-search.md
Files modified:
- src/services/search.ts (created)
- src/api/products/search.ts (created)
- src/types/search.ts (created)
What's next?
1. 🔍 /ai-factory.verify — Verify nothing was missed (recommended)
2. 💾 /ai-factory.commit — Commit the changes directly
Context is heavy after implementation. All code changes 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
Suggest verification:
AskUserQuestion: All tasks complete. Run verification?
Options:
1. Verify first — Run /ai-factory.verify to check completeness (recommended)
2. Skip to commit — Go straight to /ai-factory.commit
If user chooses "Verify first" → suggest invoking /ai-factory.verify.
If user chooses "Skip to commit" → suggest invoking /ai-factory.commit.
Check if documentation needs updating:
Read the plan file settings. If documentation preference is set to "yes" (from /ai-factory.feature questions), run /ai-factory.docs to update documentation.
If documentation preference is "no" or not set — skip this step silently.
If documentation preference is "yes":
📝 Updating project documentation...
→ Invoke /ai-factory.docs to analyze changes and update docs.
Handle plan file after completion:
If .ai-factory/PLAN.md (direct /ai-factory.task, not from /ai-factory.feature):
Would you like to delete .ai-factory/PLAN.md? (It's no longer needed)
- [ ] Yes, delete it
- [ ] No, keep it
If branch-named file (e.g., .ai-factory/features/feature-user-auth.md):
Check if running in a git worktree:
Detect worktree context:
# If .git is a file (not a directory), we're in a worktree
[ -f .git ]
If we ARE in a worktree, offer to merge back and clean up:
You're working in a parallel worktree.
Branch: <current-branch>
Worktree: <current-directory>
Main repo: <main-repo-path>
Would you like to merge this branch into main and clean up?
- [ ] Yes, merge and clean up (recommended)
- [ ] No, I'll handle it manually
If user chooses "Yes, merge and clean up":
Ensure everything is committed — check git status. If uncommitted changes exist, suggest /ai-factory.commit first and wait.
Get main repo path:
MAIN_REPO=$(git rev-parse --git-common-dir | sed 's|/\.git$||')
BRANCH=$(git branch --show-current)
Switch to main repo:
cd "${MAIN_REPO}"
Merge the branch:
git checkout main
git pull origin main
git merge "${BRANCH}"
If merge conflict occurs:
⚠️ Merge conflict detected. Resolve manually:
cd <main-repo-path>
git merge --abort # to cancel
# or resolve conflicts and git commit
→ STOP here, do not proceed with cleanup.
Remove worktree and branch (only if merge succeeded):
git worktree remove <worktree-path>
git branch -d "${BRANCH}"
Confirm:
✅ Merged and cleaned up!
Branch <branch> merged into main.
Worktree removed.
You're now in: <main-repo-path> (main)
If user chooses "No, I'll handle it manually", show a reminder:
To merge and clean up later:
cd <main-repo-path>
git merge <branch>
/ai-factory.feature --cleanup <branch>
IMPORTANT: NO summary reports, NO analysis documents, NO wrap-up tasks.
/ai-factory.implement
Continues from next incomplete task.
/ai-factory.implement 5
Starts from task #5 (useful for skipping or re-doing).
/ai-factory.implement status
Shows progress without executing.
┌─────────────────────────────────────────────┐
│ Feature: User Authentication │
├─────────────────────────────────────────────┤
│ ✅ #1 Create user model │
│ ✅ #2 Add registration endpoint │
│ ✅ #3 Add login endpoint │
│ 🔄 #4 Implement JWT generation ← current │
│ ⏳ #5 Add password reset │
│ ⏳ #6 Add email verification │
├─────────────────────────────────────────────┤
│ Progress: 3/6 (50%) │
└─────────────────────────────────────────────┘
If a task cannot be completed:
⚠️ Blocker encountered on Task #4
Issue: [Description of the problem]
Options:
1. Skip this task and continue (mark as blocked)
2. Modify the task approach
3. Stop implementation and discuss
What would you like to do?
Tasks are persisted in the conversation/project state.
Starting new session:
User: /ai-factory.implement
Claude: Resuming implementation...
Found 3 completed tasks, 5 pending.
Continuing from Task #4: Implement JWT generation
[Executes task #4]
Session 1:
/ai-factory.feature Add user authentication
→ Creates branch: feature/user-authentication
→ Asks about tests (No), logging (Verbose)
→ /ai-factory.task creates 6 tasks
→ Saves plan to: .ai-factory/features/feature-user-authentication.md
→ /ai-factory.implement starts
→ Completes tasks #1, #2, #3
→ User ends session
Session 2:
/ai-factory.implement
→ Detects branch: feature/user-authentication
→ Reads plan: .ai-factory/features/feature-user-authentication.md
→ Loads state: 3/6 complete
→ Continues from task #4
→ Completes tasks #4, #5, #6
→ All done, suggests /ai-factory.commit
- [ ] → - [x] immediately after task completionALWAYS add verbose logging when implementing code. AI-generated code often has subtle bugs that are hard to debug without proper logging.
function processOrder(order: Order): Result {
console.log('[processOrder] START', { orderId: order.id, items: order.items.length });
try {
const validated = validateOrder(order);
console.log('[processOrder] Validation passed', { validated });
const result = submitToPayment(validated);
console.log('[processOrder] Payment result', { success: result.success, transactionId: result.id });
return result;
} catch (error) {
console.error('[processOrder] ERROR', { orderId: order.id, error: error.message, stack: error.stack });
throw error;
}
}
Logs must be configurable and manageable:
// Good: Configurable logging
const LOG_LEVEL = process.env.LOG_LEVEL || 'debug';
const logger = createLogger({ level: LOG_LEVEL });
// Good: Can be disabled
if (process.env.DEBUG) {
console.log('[debug]', data);
}
// Bad: Hardcoded verbose logs that can't be turned off
console.log(hugeObject); // Will pollute production logs
DO NOT skip logging to "keep code clean" - verbose logging is REQUIRED during implementation, but MUST be configurable.
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.