learn
Update fx-cc plugin skills based on conversation learnings. Use when the user says "use /learn to...", "learn to...", "remember to...", "don't do X again", or when a skill misbehaved and needs correction. This skill modifies plugin source files but does NOT commit changes - they require manual review before committing.
What this skill does
# Learn This skill updates fx-cc marketplace plugins based on learnings from the current conversation. It modifies skill definitions to prevent future mistakes or improve behavior. ## Prerequisites Before making any changes, verify the fx-cc marketplace is accessible: ```bash cd ~/.claude/plugins/marketplaces/fx-cc && git remote -v && git status ``` Verify the remote is accessible and the working directory is clean. If not accessible, inform the user and abort. ### Read CLAUDE.md and respect it **CRITICAL:** Read `CLAUDE.md` at the root of the marketplace repo (`~/.claude/plugins/marketplaces/fx-cc/CLAUDE.md`) and follow every instruction it contains, especially the **Required First-Time Setup** section. CLAUDE.md is authoritative — its rules apply to every operation this skill performs in the repo. ### Wire up the pre-commit hook (idempotent) Before any modification, ensure the version-bump pre-commit hook is active in this clone of the marketplace. Git does not let a repo configure its own hooks path, so each clone must opt in once: ```bash cd ~/.claude/plugins/marketplaces/fx-cc # Check whether hooks are wired up; if not, wire them. if [ "$(git config --get core.hooksPath || true)" != ".githooks" ]; then git config core.hooksPath .githooks echo "✓ Wired core.hooksPath → .githooks" else echo "✓ Hooks already wired" fi ``` Run this at the very start of any learn invocation, not only when committing. It is idempotent and safe. **Never bypass the hook** with `--no-verify`. If the hook rejects a future commit, read its message and bump the indicated `plugin.json` / `marketplace.json` versions per the rules in CLAUDE.md. ## Workflow ### Step 1: Analyze the Learning Request Examine the current conversation to understand: 1. **What went wrong** - Identify the specific behavior that needs correction 2. **Root cause** - Determine which skill caused the issue 3. **Desired behavior** - Understand what should happen instead Common scenarios: - **Skill not loaded when it should have been** → Update skill description to be clearer about trigger conditions - **Skill produced incorrect behavior** → Add explicit prohibition to skill instructions - **Skill missed a step** → Add the step to the skill's workflow - **Instruction was ambiguous** → Clarify the wording ### Step 2: Locate Relevant Files Search the fx-cc marketplace for relevant files: ```bash # Find all plugin definitions find ~/.claude/plugins/marketplaces/fx-cc/plugins -name "*.md" -type f # Search for specific content grep -r "keyword" ~/.claude/plugins/marketplaces/fx-cc/plugins/ ``` Key locations: - **Skills**: `plugins/<plugin>/skills/<skill>/SKILL.md` ### Step 3: Make Targeted Modifications Edit the relevant files to address the learning. Follow these principles: 1. **Be specific** - Add concrete instructions, not vague guidance 2. **Use imperative form** - Write "Do X" or "Never do Y", not "You should..." 3. **Add context** - Explain why the rule exists if non-obvious 4. **Preserve structure** - Maintain existing formatting and organization For prohibitions, use clear language: ```markdown **CRITICAL:** Never do X because Y. ``` For required actions: ```markdown **IMPORTANT:** Always do X before Y. ``` ### Step 4: Sync to Plugin Cache **CRITICAL:** Claude Code caches plugins separately from the marketplace source. After modifying files in the marketplace, sync changes to the cache so they take effect immediately. Cache mapping: - **Source**: `~/.claude/plugins/marketplaces/fx-cc/plugins/<plugin>/` - **Cache**: `~/.claude/plugins/cache/fx-cc/<plugin>/<version>/` To sync a modified plugin: ```bash # Get the plugin version from its manifest PLUGIN=fx-dev # or fx-meta, fx-research, etc. VERSION=$(cat ~/.claude/plugins/marketplaces/fx-cc/plugins/$PLUGIN/.claude-plugin/plugin.json | grep '"version"' | sed 's/.*: *"\([^"]*\)".*/\1/') # Sync marketplace source to cache rsync -av --delete \ ~/.claude/plugins/marketplaces/fx-cc/plugins/$PLUGIN/ \ ~/.claude/plugins/cache/fx-cc/$PLUGIN/$VERSION/ ``` Sync every plugin that was modified. This ensures Claude loads the updated definitions immediately without requiring a restart. ### Step 5: Verify Changes After editing and syncing, show the diff to the user: ```bash cd ~/.claude/plugins/marketplaces/fx-cc && git diff ``` ### Step 6: Leave for Manual Review **CRITICAL:** Do NOT commit the changes. Inform the user: > Changes have been made to the following files: > - `path/to/file1.md` > - `path/to/file2.md` > > Review the changes with `git diff` in `~/.claude/plugins/marketplaces/fx-cc`. > Commit manually when satisfied. ## Examples ### Example 1: Skill Skipped a Step User says: "use /learn to update our sdlc skills - they should update PROJECT.md when creating PRs" 1. Locate `plugins/fx-dev/skills/pr-preparer/SKILL.md` 2. Add instruction to check PROJECT.md and update completed tasks 3. Sync fx-dev plugin to cache 4. Show diff, leave uncommitted ### Example 2: Skill Not Triggered User says: "the github skill didn't load when I ran gh commands" 1. Locate `plugins/fx-dev/skills/github/SKILL.md` 2. Update description to include more trigger phrases (e.g., "gh CLI", "GitHub API") 3. Sync fx-dev plugin to cache 4. Show diff, leave uncommitted ### Example 3: Explicit Prohibition User says: "/learn to never leave comments on PRs" 1. Locate relevant skills (pr-preparer, pr-reviewer, etc.) 2. Add explicit prohibition with rationale 3. Sync all modified plugins to cache 4. Show diff, leave uncommitted
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.