agentleFS
alirezarezvanialirezarezvani/claude-code-skill-factory/.github/CLAUDE.md

claude-code-skill-factory

CLAUDE.md877 starsChanged 13 months agoMITView on GitHub

This file provides guidance for working with GitHub workflows and automation in this repository. CRITICAL: All work on this project MUST follow this workflow. NO EXCEPTIONS. ✅ CORRECT - Small Plan (5 tasks): ❌ WRONG - Too Many Tasks: GOLDEN RULE: 5-10 TASKS MAXIMUM PER PLAN ISSUE

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. krzemienski/claude-code-skills-factory★ 0100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

20 rules. About 0 are common, 14 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    CRITICAL: All work on this project MUST follow this workflow.

    line 9
  2. Distinctive:

    Use plan mode to create a detailed implementation plan

    line 14
  3. Distinctive:

    Wait for explicit approval before proceeding

    line 21
  4. Very specific:

    Create a GitHub issue with the plan label

    line 25
  5. Very specific:

    Use markdown checkboxes for tasks: - [ ] Task name

    line 27
  6. Distinctive:

    For large initiatives: Create multiple small plan issues, NOT one giant plan

    line 29
  7. Distinctive:

    All subtasks are linked to the parent issue

    line 33
  8. Distinctive:

    All added to project board for tracking

    line 34
  9. Distinctive:

    Update issue status as you progress

    line 39
  10. Distinctive:

    Parent: Always linked to parent PLAN

    line 131
  11. Very specific:

    If sync appears stuck: Check rate limits with gh api rate_limit

    line 217
  12. Distinctive:

    If status out of sync: Manually trigger by re-labeling or moving on board

    line 218
  13. Distinctive:

    If getting rate limit warnings: Wait for cooldown (syncs will resume automatically)

    line 219
  14. Distinctive:

    If all tasks done → automatically closes plan with celebration comment

    line 256
  15. Distinctive:

    When issues are created, closed, or labeled

    line 287
  16. Very specific:

    Create issue with plan label

    line 313
  17. Distinctive:

    Add 5-10 tasks in checklist format

    line 314
  18. Very specific:

    If valid, adds plan-validated label

    line 316
  19. Distinctive:

    Create checklist in task body (max 5 items)

    line 322
  20. Very specific:

    Remove skip-triage label when ready for classification

    line 326

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

.github/CLAUDE.md

This file provides guidance for working with GitHub workflows and automation in this repository.


🚨 MANDATORY WORKFLOW REQUIREMENT

CRITICAL: All work on this project MUST follow this workflow. NO EXCEPTIONS.

Required Process for Every User Request

  1. PLAN MODE FIRST
    • Use plan mode to create a detailed implementation plan
    • Break down the work into clear, actionable steps
    • KEEP PLANS SMALL: 5-10 tasks maximum
    • Estimate effort and identify potential challenges
  2. GET USER APPROVAL
    • Present the plan to the user
    • Wait for explicit approval before proceeding
    • Address any questions or concerns
  3. CREATE GITHUB ISSUE
    • Create a GitHub issue with the plan label
    • Include the approved plan in the issue body
    • Use markdown checkboxes for tasks: - [ ] Task name
    • MAXIMUM 5-10 TASKS - The plan-to-issues automation creates one issue per task
    • For large initiatives: Create multiple small plan issues, NOT one giant plan
  4. AUTOMATION CREATES SUBTASKS
    • GitHub workflow creates individual issues for each task
    • All subtasks are linked to the parent issue
    • All added to project board for tracking
    • WARNING: 40+ tasks = API rate limits and issue spam
  5. START IMPLEMENTATION
    • Begin work on subtasks in priority order
    • Update issue status as you progress
    • Reference issue numbers in commits

Why This Matters

  • ✅ Proper tracking: Every task is tracked in GitHub issues and project board
  • ✅ Clear planning: Prevents scope creep and ensures thoughtful approach
  • ✅ Team visibility: Everyone can see what's being worked on
  • ✅ Audit trail: Complete history of decisions and implementation
  • ✅ Automation leverage: Uses the excellent GitHub automation built into this repo

Example Workflows

✅ CORRECT - Small Plan (5 tasks):

User: "Add a new skill for data visualization"

1. Enter plan mode
2. Create plan with 5 tasks:
   - Research data visualization libraries
   - Design SKILL.md structure
   - Implement Python visualization classes
   - Create sample data and HOW_TO_USE.md
   - Test with real data
3. Present plan to user, get approval
4. Create GitHub issue with 'plan' label containing 5 tasks
5. Automation creates 5 subtask issues
6. Begin implementation

❌ WRONG - Too Many Tasks:

User: "Create comprehensive Wiki documentation"

DON'T DO THIS:
- Create issue with 40+ tasks in checkboxes
- Results in 40+ GitHub issues created
- Hits API rate limits
- Creates issue spam

DO THIS INSTEAD:
- Break into 3-4 small plan issues:
  - Plan #1: Wiki Foundation (5 tasks)
  - Plan #2: Core Wiki Pages (6 tasks)
  - Plan #3: Advanced Documentation (5 tasks)

GOLDEN RULE: 5-10 TASKS MAXIMUM PER PLAN ISSUE


📋 Task Hierarchy (Plan → Task → Subtask)

Three-Level Structure

PLAN ISSUE (#100)                      - Epic or feature
  ├─ TASK #101 (5-10 tasks)           - Major work item
  │   ├─ SUBTASK #103 (0-5 subtasks)  - Atomic work
  │   ├─ SUBTASK #104
  │   └─ SUBTASK #105
  ├─ TASK #102
  │   ├─ SUBTASK #106
  │   └─ SUBTASK #107
  └─ TASK #108

Level 1: PLAN Issues

  • Purpose: High-level feature or epic
  • Task Count: 5-10 tasks (enforced by plan-validator workflow)
  • Labels: plan, plan-validated
  • Created: Manually by team
  • Format:
    ## Goal
    [What we're building and why]
    
    ## Tasks
    - [ ] Task 1: Clear, actionable description
    - [ ] Task 2: Clear, actionable description
    - [ ] Task 3-10: ...
    
    ## Acceptance Criteria
    - [ ] Criterion 1
    - [ ] Criterion 2

Level 2: TASK Issues

  • Purpose: Major work item (can be completed independently)
  • Title: "Task: [description]" (auto-generated)
  • Labels: task, plan-item, skip-triage
  • Created: Automatically by plan-to-tasks workflow
  • Parent: Always linked to parent PLAN
  • Subtasks: Optional (0-5 subtasks, triggered by needs-subtasks label)
  • Scope: Focused piece of work (1-3 days)

Level 3: SUBTASK Issues

  • Purpose: Atomic work unit (smallest unit)
  • Title: "Subtask: [description]" (auto-generated)
  • Labels: subtask, skip-triage
  • Created: Automatically by task-to-subtasks workflow
  • Parent: Linked to parent TASK and grandparent PLAN
  • Scope: Single, focused piece of work (1-3 hours)
  • Maximum: 5 subtasks per task (enforced)

Workflow States & Labels

Triage Control:

  • skip-triage - Skips automatic classification (removed when ready)
  • needs-subtasks - Triggers subtask creation (on TASK issues only)

Status Tracking (synced with project board):

  • status: triage - Needs classification
  • status: backlog - Planned but not ready
  • status: ready - Ready to start
  • status: in-progress - Actively being worked on
  • status: in-review - Under review
  • status: done - Completed (auto-applied when issue closed)

Smart Bidirectional Synchronization

Workflow: .github/workflows/smart-sync.yml

The smart-sync workflow replaces the old issue-to-project-sync and project-to-issue-sync workflows with a single, intelligent system that prevents sync loops and respects rate limits.

Key Features:

  • ✅ 10-second debouncing: Prevents rapid back-and-forth updates
  • ✅ Circuit breaker: Checks rate limits before executing (requires 50+ remaining)
  • ✅ Direction detection: Automatically determines sync direction based on event source
  • ✅ Silent operation: No notification spam (updates without comments)
  • ✅ Loop prevention: One-way sync logic prevents ping-pong loops

How It Works:

  1. Event Triggers:
    • Issue labeled/closed/reopened → Syncs Issue → Project Board
    • Project board status changed → Syncs Project Board → Issue
  2. Safety Checks:
    • Rate limit check (circuit breaker)
    • 10-second debounce delay
    • Concurrency control (cancel in-progress runs)
  3. Sync Operations:

    Issue → Project Board:

    • Adds issue to project if not present
    • Maps issue status labels to project board columns
    • Updates project board status field
    • Closes/reopens based on issue state

    Project Board → Issue:

    • Removes old status labels
    • Adds new status label based on project board column
    • Closes issue if moved to "Done"
    • Reopens issue if moved from "Done"
  4. Status Mapping:
    Issue Label          ↔  Project Board Column
    ─────────────────────────────────────────────
    status: triage       ↔  To triage
    status: backlog      ↔  Backlog
    status: ready        ↔  Ready
    status: in-progress  ↔  In Progress
    status: in-review    ↔  In Review
    status: done         ↔  Done
    (closed state)       ↔  Done

Best Practices:

  • ✅ DO: Change status on project board OR issue (not both at once)
  • ✅ DO: Wait 10 seconds between rapid status changes
  • ✅ DO: Use status labels for tracking (they sync automatically)
  • ❌ DON'T: Manually update both issue and project board (creates duplicate syncs)
  • ❌ DON'T: Make rapid status changes (triggers rate limit protection)

Troubleshooting:

  • If sync appears stuck: Check rate limits with gh api rate_limit
  • If status out of sync: Manually trigger by re-labeling or moving on board
  • If getting rate limit warnings: Wait for cooldown (syncs will resume automatically)

Monitoring & Automation

Three Powerful Automation Workflows:

1. Workflow Health Monitor (.github/workflows/workflow-health.yml)

Automated system health monitoring every 6 hours.

What It Monitors:

  • ✅ GitHub API rate limits (REST & GraphQL)
  • ✅ Workflow success rates (last 24 hours)
  • ✅ Task hierarchy statistics (Plans, Tasks, Subtasks)

Alerting:

  • Creates health alert issues when problems detected
  • Critical: Rate limits <20% OR success rate <70%
  • Warning: Rate limits <40% OR success rate <85%

Manual Trigger: Go to Actions → Workflow Health Monitor → Run workflow

What You Get:

📊 Rate Limits: REST 85% | GraphQL 82%
📈 Workflows: 47 runs, 94% success rate
🏗️ Hierarchy: 3 plans (2 open), 18 tasks (12 open), 23 subtasks (15 open)

2. Plan Auto-Close (.github/workflows/plan-auto-close.yml)

Automatically closes plan issues when all tasks are completed.

How It Works:

  1. Triggers when any TASK issue is closed
  2. Checks if task belongs to a PLAN
  3. Counts remaining open tasks for that plan
  4. If all tasks done → automatically closes plan with celebration comment
  5. Posts progress updates at 25%, 50%, 75% milestones

Benefits:

  • ✅ No manual plan closure needed
  • ✅ Automatic completion tracking
  • ✅ Progress milestone notifications
  • ✅ Clear completion summaries

Example Comment:

## ✅ Plan Completed

All 8 tasks have been completed! This plan is now being automatically closed.

📊 Completion Summary
- Total Tasks: 8
- Completed: 8
- Success Rate: 100%

🎉 What's Next?
- Review completed work
- Archive or reference for future projects

3. Hierarchy Dashboard (.github/workflows/hierarchy-dashboard.yml)

Generates visual Plan→Task→Subtask tree in HIERARCHY.md.

Updates:

  • Every 12 hours (scheduled)
  • When issues are created, closed, or labeled
  • Manual trigger via workflow dispatch

What It Shows:

  • Overview table with completion percentages
  • Visual tree of all active plans with tasks and subtasks
  • Progress bars for each plan
  • Recently completed plans (last 10)

Example Tree:

📋 Plan #55: Create Wiki Documentation
Progress: 5/8 tasks (62%)

├─ ✅ #58: Create Wiki Home page
│  ├─ ✅ #60: Design page structure
│  └─ ✅ #61: Write content
├─ 🔲 #59: Add skill documentation
├─ ✅ #62: Create navigation

Quick Links: View Current Dashboard

How to Use the Hierarchy

Creating a Plan:

  1. Create issue with plan label
  2. Add 5-10 tasks in checklist format
  3. Validation workflow checks count & rate limits
  4. If valid, adds plan-validated label
  5. Plan-to-tasks workflow creates TASK issues automatically

Breaking Down a Task:

  1. Open a TASK issue
  2. Add needs-subtasks label
  3. Create checklist in task body (max 5 items)
  4. Task-to-subtasks workflow creates SUBTASK issues automatically

Working on Tasks/Subtasks:

  1. Remove skip-triage label when ready for classification
  2. Auto-triage workflow classifies and prioritizes
  3. Move to "In Progress" on project board when starting work
  4. Close issue when done (auto-syncs to "Done" on board)

Best Practices

Plan Issues:

  • ✅ DO: Keep to 5-10 tasks
  • ✅ DO: Make tasks independent when possible
  • ✅ DO: Write clear, actionable task descriptions
  • ❌ DON'T: Create 20+ task plans (split into multiple plans)
  • ❌ DON'T: Make tasks too vague or too detailed

Task Issues:

  • ✅ DO: Add needs-subtasks if task is complex
  • ✅ DO: Keep subtask count to 5 or fewer
  • ✅ DO: Link to parent PLAN in description
  • ❌ DON'T: Create subtasks manually (use automation)
  • ❌ DON'T: Skip the skip-triage label removal step

Subtask Issues:

  • ✅ DO: Keep scope small and focused (1-3 hours)
  • ✅ DO: Link to both parent TASK and grandparent PLAN
  • ✅ DO: Close promptly when completed
  • ❌ DON'T: Create sub-subtasks (3 levels max)
  • ❌ DON'T: Make subtasks too granular

Examples

Good Plan (7 tasks):

## Goal
Implement user authentication system

## Tasks
- [ ] Design login UI components
- [ ] Implement JWT authentication backend
- [ ] Add password reset flow
- [ ] Create user profile management
- [ ] Implement session handling
- [ ] Add OAuth integration (Google, GitHub)
- [ ] Write authentication tests

## Acceptance Criteria
- [ ] Users can log in with email/password
- [ ] JWT tokens expire after 24h
- [ ] OAuth integration works
- [ ] 90%+ test coverage

Good Task with Subtasks (Task #101):

Title: Task: Design login UI components
Labels: task, plan-item, needs-subtasks

## Description
Create all UI components needed for user authentication

## Subtasks
- [ ] Create LoginForm component
- [ ] Create SignupForm component
- [ ] Add form validation
- [ ] Design password strength indicator
- [ ] Create forgot password UI

This creates 5 subtask issues automatically.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.