agentleFS
dungnotnulldungnotnull/black-garlic-fermentation-optimization-agent-skill/config/SKILL.md

config

Skill5 starsChanged 4 months agoMITView on GitHub

The SKILL Registry is the central system for managing, resolving, and executing all skills in the black-garlic-fermentation-optimization project. This document describes how skills are registered, how they are resolved during execution, their input/output schemas, and how they are validated. Every skill MUST include YAML frontmatter with these fields: Skills are automatically registered at system startup: From each skill file, the system extracts: The main skill (skills/main.md) orchestrates the entire workflow: Each sub-skill is invoked sequentially: If a sub-skill fails: Each…

15 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use uninstall, status and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    uninstall

    Uninstall a community skill that was installed via the hub. Confirms before deleting files, refuses to touch first-party plugin skills, and logs every action. Use when the user wants to fully remove a community skill ("uninstall [skill]", "remove this skill") rather than just disable it.

    Also in 3 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 4 projects that use this

  • VercelSkill

    setup

    Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 13 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every skill MUST include YAML frontmatter with these fields:

    line 39
  2. Distinctive:

    If a sub-skill fails:

    line 91
  3. Distinctive:

    Failure: If critical, halt and emit error

    line 97
  4. Distinctive:

    Auto-fix: If failed, attempt auto-fix (if enabled)

    line 267
  5. Very specific:

    Failure: If failed after retries, emit GATE_ON_FAILURE hook

    line 270
  6. Distinctive:

    web_search: Search web for current information

    line 320
  7. Distinctive:

    All skill executions are tracked:

    line 355
  8. Very specific:

    Create skills/new-skill.md with proper frontmatter

    line 387
  9. Distinctive:

    Add input/output schemas to this document

    line 389
  10. Very specific:

    Add test scenario to tests/test-scenarios.md

    line 391
  11. Very specific:

    Document input/output in this SKILL.md

    line 400
  12. Very specific:

    Add event to HookEvent enum in config/hooks.py

    line 407
  13. Distinctive:

    Document hook purpose and context

    line 409
  14. Distinctive:

    Add test coverage for hook behavior

    line 410
  15. Distinctive:

    Frontmatter: Must include name and description

    line 418
  16. Distinctive:

    Sections: Must include required sections

    line 419
  17. Distinctive:

    Gates: Must specify quality gates

    line 421
  18. Distinctive:

    Tools: Must specify required tools

    line 422

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “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
SKILL.md

SKILL Registry — black-garlic-fermentation-optimization

Overview

The SKILL Registry is the central system for managing, resolving, and executing all skills in the black-garlic-fermentation-optimization project. This document describes how skills are registered, how they are resolved during execution, their input/output schemas, and how they are validated.

Skill Architecture

Hierarchical Structure

black-garlic-fermentation-optimization (Main Skill)
├── Sub-skills (Sequential Execution)
│   ├── sub-gather-requirements
│   ├── sub-evidence-collector
│   ├── sub-core-analysis
│   ├── sub-knowledge-updater
│   └── sub-advisor
├── Tools (Dynamic Invocation)
│   ├── web_search
│   ├── knowledge_query
│   └── fermentation_analysis
└── Quality Gates (Enforcement)
    ├── Universal Gates (U1-U6)
    └── Domain Gates (G1-G4)

Skill Resolution Process

  1. Discovery: Skills are discovered from the skills/ directory
  2. Registration: Each skill's frontmatter is parsed and registered
  3. Validation: Skill schemas are validated against the contract
  4. Execution: Skills are executed in the defined order with hooks

Skill Registration

Frontmatter Schema

Every skill MUST include YAML frontmatter with these fields:

---
name: skill-name              # Unique identifier (kebab-case)
description: one-line summary # When to trigger, what it does
---

Registration Process

Skills are automatically registered at system startup:

  1. Scan skills/ directory for *.md files
  2. Parse YAML frontmatter from each file
  3. Validate required fields (name, description)
  4. Extract skill metadata (sections, tools, gates)
  5. Register in skill registry with metadata

Skill Metadata Extraction

From each skill file, the system extracts:

  • Sections: Role & Persona, Workflow, Tools, Output Format, Quality Gates
  • Tool Dependencies: List of tools the skill requires
  • Gate Dependencies: Quality gates the skill participates in
  • Language Support: Whether the skill supports multiple languages
  • Sub-skills: For main.md, the list of sub-skills it orchestrates

Skill Execution Model

Main Harness Execution

The main skill (skills/main.md) orchestrates the entire workflow:

USER INPUT → Pre-Flight (Language Detection) → Step 1 → Step 2 → Step 3 → Step 4 → Step 5 → Quality Gates → OUTPUT

Sub-Skill Execution

Each sub-skill is invoked sequentially:

  1. Invoke: Skill("sub-skill-name") called
  2. Pre-hook: SUBSKILL_BEFORE_INVOKE hook emitted
  3. Execute: Sub-skill runs with its context
  4. Post-hook: SUBSKILL_AFTER_INVOKE hook emitted
  5. Validate: Quality gates checked
  6. Continue: Next sub-skill or error handling

Error Handling

If a sub-skill fails:

  1. Hook: SUBSKILL_ON_FAILURE hook emitted
  2. Retry: Up to 3 attempts with exponential backoff
  3. Fallback: Graceful degradation to lower quality level
  4. Recovery: Continue with next sub-skill if possible
  5. Failure: If critical, halt and emit error

Input/Output Schemas

Input Schema

Each skill accepts structured input:

interface SkillInput {
  skill_name: string;           // Target skill name
  parameters: Record<string, any>;  // Skill-specific parameters
  context: {
    execution_id: string;        // Unique execution identifier
    language: string;            // Output language (en, vi)
    degradation_level: number;   // Current degradation level (0-4)
    metadata: Record<string, any>;  // Additional context
  };
}

Output Schema

Each skill produces structured output:

interface SkillOutput {
  success: boolean;
  skill_name: string;
  result: {
    data: any;                   // Skill-specific result data
    metadata: Record<string, any>;  // Execution metadata
  };
  gates_passed: string[];        // Quality gates that passed
  gates_failed: string[];        // Quality gates that failed
  execution_time_ms: number;
  timestamp: string;            // ISO 8601 timestamp
}

Skill-Specific Schemas

sub-gather-requirements

Input:

{
  raw_message: string;
  provided_materials: any[];
}

Output:

{
  object: string;
  scope: string;
  timeframe: string;
  available_inputs: any[];
  target_audience: string;
  language: string;
  analysis_type: string;
}

sub-evidence-collector

Input:

{
  requirements: object;  // From sub-gather-requirements
}

Output:

{
  current_data: any[];
  authoritative_docs: any[];
  recent_news: any[];
  reference_benchmarks: any[];
  sources: Array<{url: string, date: string, tier: number}>;
}

sub-core-analysis

Input:

{
  garlic: object;
  equipment: object;
  target: object;
  language: string;
}

Output:

{
  cycle: {temperature: number, humidity: number, duration_days: number};
  maillard_progress: object;
  sac_retention: object;
  antioxidant_levels: object;
  sensory_profile: object;
  quality_metrics: object;
  scenarios: {best: object, base: object, worst: object};
}

sub-knowledge-updater

Input:

{
  keywords: string[];
  max_results?: number;
}

Output:

{
  citations: Array<{
    author: string;
    year: number;
    title: string;
    venue: string;
    doi_or_url: string;
    tier: number;
    relevance: string;
    key_finding: string;
  }>;
  gaps: string[];
  coverage_rating: string;
}

sub-advisor

Input:

{
  core_analysis: object;
  evidence_bundle: object;
  knowledge_evidence: object;
}

Output:

{
  conclusion: string;  // "Optimal Fermentation" | "Conditional (tune cycle)" | "Low SAC/Quality" | "Inconclusive"
  scenarios: {best: object, base: object, worst: object};
  key_risks: Array<{risk: string, probability: string, impact: string}>;
  evidence_chain: Array<{claim: string, source: string}>;
  remediation: string[];
  disclosure: string;
}

Quality Gate Validation

Gate Enforcement

Each quality gate follows this process:

  1. Pre-hook: GATE_BEFORE_CHECK hook emitted
  2. Check: Gate condition evaluated
  3. Decision: Pass or fail
  4. Auto-fix: If failed, attempt auto-fix (if enabled)
  5. Retry: Re-check after auto-fix (max 2 retries)
  6. Post-hook: GATE_AFTER_CHECK hook emitted
  7. Failure: If failed after retries, emit GATE_ON_FAILURE hook

Universal Gates (U1-U6)

GateConditionAuto-Fix
U1≥3 sources cited, ≥1 academic/authoritativeFetch from knowledge base
U2Disclosure before recommendationPrepend disclosure
U3Evidence hierarchy per sourceAnnotate tiers
U4Language matches user preferenceTranslate output
U5Output uses templateReformat
U6Every claim traceableFlag unsupported

Domain Gates (G1-G4)

GateConditionAuto-Fix
G1Fermentation cycle setSet default cycle
G2SAC trackedAdd SAC tracking
G3Sensory assessedAssess sensory
G4Quality/safety includedAdd quality/safety

Tool Integration

Tool Invocation

Skills can dynamically invoke registered tools:

# Get tool registry
registry = get_tool_registry()

# Execute tool
result = registry.execute(
    "web_search",
    query="black garlic fermentation",
    max_results=10
)

# Check result
if result.success:
    data = result.data
else:
    error = result.error

Available Tools

See config/tools.py for complete tool definitions:

  • web_search: Search web for current information
  • knowledge_query: Query SECOND-KNOWLEDGE-BRAIN.md
  • fermentation_analysis: Analyze fermentation parameters

Configuration Integration

Skill Configuration

Skills can access system configuration:

from config import get_config

config = get_config()

# Access configuration
llm_model = config.llm.model_name
temperature = config.llm.temperature
enable_web_search = config.is_feature_enabled(FeatureFlag.ENABLE_WEB_SEARCH)

Feature Flags

Skills should respect feature flags:

if config.is_feature_enabled(FeatureFlag.ENABLE_GRACEFUL_DEGRADATION):
    # Apply graceful degradation logic
    pass

Performance Monitoring

Execution Tracking

All skill executions are tracked:

from config.logging import get_logger

logger = get_logger("skill_execution")

with logger.performance_tracking("sub-core-analysis"):
    # Execute skill
    result = execute_skill("sub-core-analysis", **params)

Statistics

Skill execution statistics are available:

from config.tools import get_tool_registry

registry = get_tool_registry()
stats = registry.get_stats("fermentation_analysis")

print(f"Execution count: {stats['execution_count']}")
print(f"Average time: {stats['avg_execution_time_ms']}ms")

Extension Points

Adding New Skills

To add a new skill:

  1. Create skills/new-skill.md with proper frontmatter
  2. Implement required sections (Role, Workflow, Tools, Output, Gates)
  3. Add input/output schemas to this document
  4. Register in main.md if it's a sub-skill
  5. Add test scenario to tests/test-scenarios.md

Adding New Tools

To add a new tool:

  1. Define tool schema in config/tools.py
  2. Implement ToolHandler subclass
  3. Register in register_builtin_tools()
  4. Document input/output in this SKILL.md
  5. Add usage examples

Adding New Hooks

To add a new hook:

  1. Add event to HookEvent enum in config/hooks.py
  2. Register hook handler in appropriate lifecycle point
  3. Document hook purpose and context
  4. Add test coverage for hook behavior

Validation

Skill Validation

Skills are validated against these criteria:

  1. Frontmatter: Must include name and description
  2. Sections: Must include required sections
  3. Schema: Input/output must match defined schemas
  4. Gates: Must specify quality gates
  5. Tools: Must specify required tools

Validation Process

from config import validate_config

config = get_config()
errors = validate_config(config)

if errors:
    for error in errors:
        print(f"Validation error: {error}")
else:
    print("Configuration valid")

References

  • Main Skill: skills/main.md
  • Sub-Skills: skills/sub-*.md
  • Tool Definitions: config/tools.py
  • Hook System: config/hooks.py
  • Logging: config/logging.py
  • Configuration: config/__init__.py

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.