cfn-expert-update

Update CFN system expert agent with relevant git commits and project changes

14 stars

Best use case

cfn-expert-update is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Update CFN system expert agent with relevant git commits and project changes

Teams using cfn-expert-update should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/cfn-expert-update/SKILL.md --create-dirs "https://raw.githubusercontent.com/masharratt/claude-flow-novice/main/.claude/skills/cfn-expert-update/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cfn-expert-update/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How cfn-expert-update Compares

Feature / Agentcfn-expert-updateStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Update CFN system expert agent with relevant git commits and project changes

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# CFN Expert Update Skill

## Purpose

Updates the CFN system expert agent's knowledge base with relevant git commits and project changes. This skill analyzes recent commits, determines their relevance to the CFN system, and injects new knowledge into the expert agent to keep it up-to-date with the latest system changes.

## Usage

```bash
# Basic usage (scan last 10 commits or since last update)
bash .claude/skills/cfn-expert-update/update-expert.sh

# Dry run to see what would be updated
bash .claude/skills/cfn-expert-update/update-expert.sh --dry-run

# Scan commits since specific hash
bash .claude/skills/cfn-expert-update/update-expert.sh --since=<commit_hash>

# Force update even if no changes detected
bash .claude/skills/cfn-expert-update/update-expert.sh --force

# Combine options
bash .claude/skills/cfn-expert-update/update-expert.sh --dry-run --since=HEAD~5 --force
```

## Options

- `--dry-run`: Show what would be updated without making changes
- `--since=<hash>`: Update from specific commit instead of last tracked
- `--force`: Force update even if no new commits detected

## Relevance Scoring

The skill classifies commits into three relevance levels:

### High Priority (always included)
- Changes to `CLAUDE.md`
- CFN loop related files
- CFN commands and workflows
- Core system architecture changes

### Medium Priority (usually included)
- CFN skill updates
- Agent coordination changes
- Redis coordination patterns
- Cost optimization features
- Adaptive context changes
- Consensus mechanisms
- Swarm intelligence features

### Low Priority (sometimes included)
- CFN agent updates
- Performance improvements
- Debugging tools
- Troubleshooting guides

## Update Process

1. **Commit Analysis**: Scans git commits since last update or specified hash
2. **Relevance Detection**: Classifies each commit based on file patterns and messages
3. **Knowledge Extraction**: Generates structured knowledge blocks for relevant commits
4. **Backup Creation**: Creates timestamped backup of current expert agent
5. **Knowledge Injection**: Inserts new knowledge before the closing `---` in the agent file
6. **State Tracking**: Updates last processed commit hash

## Output Structure

Each relevant commit generates a knowledge block like:

```
# HIGH PRIORITY UPDATE
Commit: <hash>
Message: <commit message>

## System Changes
<diff summary>

## Impact
This commit contains critical system updates that affect CFN Loop methodology...
```

## Requirements

- Git repository with commits
- Bash shell (compatible with bash 4.0+)
- Required commands: git, date, grep, head, tail, mktemp, mv, cp, wc
- CFN system expert agent at `.claude/agents/custom/cfn-system-expert.md`

## Troubleshooting

### "Not in a git repository"
Ensure you're running the script from within a git repository.

### "CFN system expert agent not found"
Check that the expert agent exists at the expected location. The skill looks for:
```
.claude/agents/custom/cfn-system-expert.md
```

### "Missing required commands"
Install the missing commands listed in the error message.

### Script exits with no output
- Check if using `--dry-run` - output goes to stderr in dry run mode
- Verify commit range has commits: `git log --oneline HEAD~5..HEAD`
- Try with `--force` flag to override no-change detection

### Permission errors
The skill creates directories and files in `.claude/state` and `.claude/backups`. Ensure you have write permissions.

## Integration with CFN Workflow

This skill is typically run:
- After major feature implementations
- As part of release preparation
- When the CFN system expert seems outdated
- Periodically to keep knowledge fresh

The skill maintains state in `.claude/state/cfn-expert-last-commit` to track the last processed commit, avoiding duplicate updates.

## Examples

### Check for updates without applying them
```bash
bash .claude/skills/cfn-expert-update/update-expert.sh --dry-run
```

### Update from a specific commit
```bash
bash .claude/skills/cfn-expert-update/update-expert.sh --since=abc123
```

### Force full rescan of recent history
```bash
bash .claude/skills/cfn-expert-update/update-expert.sh --force
```

### See what would be updated from last 5 commits
```bash
bash .claude/skills/cfn-expert-update/update-expert.sh --dry-run --since=HEAD~5
```

## Limitations

Knowledge blocks injected into the agent file are not pruned automatically. If the agent file grows beyond 500 lines, manually trim older knowledge blocks to prevent context bloat.

Related Skills

supabase-schema-sync

14
from masharratt/claude-flow-novice

Introspects Supabase DB after migrations and updates project db-query skill with current schema. Run after any migration to keep agent context accurate.

commit

14
from masharratt/claude-flow-novice

Stage, commit, and push changes using a background github-commit-agent. Accepts optional args for message override or push control.

cfn-vote-implement

14
from masharratt/claude-flow-novice

MUST BE USED after cfn-dry-review or cfn-alpha-launch:manifest produces a manifest. Also the verification phase of /cfn-loop-task. Do not manually implement code review suggestions - always route through this skill. 3-agent specialized voting. Unanimous (3/3) auto-implemented with TDD. 2/3 routed to product-owner agent. 1/3 surfaced to user via AskUserQuestion (batched 4 per call, at end).

cfn-utilities

14
from masharratt/claude-flow-novice

Reusable bash utility functions for CFN Loop - logging, error handling, retry, file operations. Use when you need structured logging, atomic file operations, retry logic with exponential backoff, or standardized error handling in bash scripts.

CFN Test Runner Skill

14
from masharratt/claude-flow-novice

**Version:** 1.0.0

cfn-test-framework

14
from masharratt/claude-flow-novice

Test execution, running, and webapp testing for CFN

cfn-task-planning

14
from masharratt/claude-flow-novice

Classify tasks, initialize structured configs with scope boundaries, decompose complex tasks

Specialist Injection Skill

14
from masharratt/claude-flow-novice

## Purpose

!/bin/bash

14
from masharratt/claude-flow-novice

# cfn-task-intelligence.sh

Task Complexity Estimator

14
from masharratt/claude-flow-novice

**Version:** 1.0.0

task-classifier

14
from masharratt/claude-flow-novice

Analyzes task descriptions and classifies them into categories for agent selection

cfn-task-intelligence

14
from masharratt/claude-flow-novice

Classify tasks (type/domain), estimate complexity/iterations, recommend specialists from feedback themes