agentleFS
martinemdemartinemde/skillet/AGENTS.md

skillet

AGENTS.md19 starsChanged 11 months agoMITView on GitHub

Skillet is a CLI tool written in Go that executes Claude Agent Skills (from agentskills.io) and commands as shell scripts with formatted output. It parses SKILL.md and command.md files, extracts frontmatter configuration (allowed-tools, model, etc.), interpolates variables like {baseDir}, and invokes the Claude CLI with appropriate permissions in headless mode. Output is formatted using Charm libraries (glamour, lipgloss) for clean terminal rendering. main.go (cmd/skillet/main.go): Entry point that orchestrates the execution flow: parser (internal/parser/): Parses SKILL.md files with YAML frontmatter command…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,117 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

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

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Default sources: current directory, home directory .claude/skills

    line 63
  2. Very specific:

    Default sources: current directory .claude/commands, home .claude/commands

    line 68
  3. Very specific:

    Precedence and Shadowing: When multiple sources contain the same skill/command name, earlier sources take precedence.

    line 89
  4. Very specific:

    Run bd prime for workflow context, or install hooks (bd hooks install) for auto-injection.

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.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
AGENTS.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Skillet is a CLI tool written in Go that executes Claude Agent Skills (from agentskills.io) and commands as shell scripts with formatted output. It parses SKILL.md and command.md files, extracts frontmatter configuration (allowed-tools, model, etc.), interpolates variables like {baseDir}, and invokes the Claude CLI with appropriate permissions in headless mode. Output is formatted using Charm libraries (glamour, lipgloss) for clean terminal rendering.

Always test, format and lint code before finishing

go test ./...
go fmt ./...
golangci-lint run

Architecture

Core Components

main.go (cmd/skillet/main.go): Entry point that orchestrates the execution flow:

  • Parses CLI flags using custom flag separation logic to support flags anywhere in args
  • Resolves skill/command name → file path via resolver package
  • Builds executor config from merged CLI flags + frontmatter
  • Runs executor and formatter concurrently using pipes
  • Handles signals and context cancellation

parser (internal/parser/): Parses SKILL.md files with YAML frontmatter

  • Extracts frontmatter (name, description, allowed-tools, model, etc.)
  • Interpolates {baseDir} variables in content
  • Validates skill structure and constraints (name format, field lengths)

command (internal/command/): Parses command .md files (similar to skills but simpler)

  • Derives command name from filename
  • Supports optional frontmatter (description can be auto-extracted from content)
  • Handles variable interpolation like skills

executor (internal/executor/): Builds and runs claude CLI commands

  • Constructs args from resolved config (model, allowed-tools, system-prompt, etc.)
  • Executes in headless mode with -p --verbose --output-format stream-json
  • Provides dry-run mode to show command without executing

formatter (internal/formatter/): Processes claude's stream-json output into readable markdown

  • Parses JSON stream events
  • Renders markdown using glamour
  • Handles color control (auto/always/never)
  • Shows usage statistics when requested
  • Supports passthrough mode for raw output

discovery (internal/discovery/): Finds skills across search paths

  • Scans .claude/skills/*/SKILL.md in multiple source directories
  • Handles precedence (earlier paths shadow later ones)
  • Marks overshadowed skills for visibility

skillpath (internal/skillpath/): Manages skill search paths with priority ordering

  • Default sources: current directory, home directory .claude/skills
  • Skills in earlier sources take precedence

commandpath (internal/commandpath/): Manages command search paths (parallel to skillpath)

  • Default sources: current directory .claude/commands, home .claude/commands

resolver (internal/resolver/): Resolves skill/command names → file paths

  • Handles exact paths, directory paths, skill names, command names, URLs
  • Downloads remote skills/commands to temp files
  • Determines resource type (skill vs command) based on filename/structure

Key Patterns

Dual Resource System: Skills and commands are parallel but distinct

  • Skills: Must have name and description in frontmatter, stored as SKILL.md
  • Commands: Derive name from filename, description is optional, stored as <name>.md
  • Both support frontmatter (allowed-tools, model, etc.) and variable interpolation

Variable Interpolation:

  • {baseDir} in skills gets replaced with the absolute path to the directory containing the file.
  • $ARGUMENTS in commands gets replaced with the additional CLI arguments passed after the command name.

Precedence and Shadowing: When multiple sources contain the same skill/command name, earlier sources take precedence. Shadowed items are shown in --list but marked as overshadowed.

Concurrent Execution: Main goroutine spawns two goroutines:

  1. Executor: Runs claude CLI and writes to pipe
  2. Formatter: Reads from pipe and renders output Error handling collects errors from both channels.

Issue Tracking

This project uses bd (beads) for issue tracking. Run bd prime for workflow context, or install hooks (bd hooks install) for auto-injection.

Quick reference:

  • bd ready - Find unblocked work
  • bd create "Title" --type task --priority 2 - Create issue
  • bd close <id> - Complete work
  • bd sync - Sync with git (run at session end)

For full workflow details: bd prime

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.