4.0 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Overview
This is a Claude Code skills repository. Skills are reusable tools that extend Claude Code's capabilities. Each skill lives in its own top-level directory.
Skill Structure
Each skill follows this convention:
<skill-name>/SKILL.md— Required. YAML frontmatter (name,description, optionallyversion,allowed-tools) MUST start on line 1. This is the entry point Claude Code reads when invoking the skill.<skill-name>/CLAUDE.md— Optional. Maintainer / implementation notes kept out of the user-facing SKILL.md to reduce per-invocation token cost.<skill-name>/scripts/— Optional. Implementation scripts (typically bash). Scripts useset -euo pipefailand thedie()pattern for error handling. Invoke scripts viabash scripts/<name>.shso they work even when the executable bit did not survive deployment — but alsochmod +xthem on commit.<skill-name>/references/— Optional. Supporting files such as YAML templates or long-form reference documentation.
Parent / child skill pattern
A skill may act as a router that delegates to siblings. The gitea skill is the canonical example: its SKILL.md describes the overall domain and dispatches to gitea-tea (CLI) and gitea-wiki (wiki) child skills. When adding a child skill, reference the parent in the child's description and keep the parent's routing table current.
Current Skills
agent-setup— ValidatesAGENT_HOME, derivesGH_CONFIG_DIR=$AGENT_HOME/.github, and exports both to a session dotfile (~/.env) for child shells / sibling skills.github-app-token— Generates a short-lived GitHub App installation access token, writes it to.gh-tokenunder$GH_CONFIG_DIR(preferred) or$AGENT_HOME(fallback), and authenticates theghCLI. RequiresGITHUB_APP_ID,GITHUB_APP_INSTALLATION_ID, and one ofGITHUB_APP_PEM(inline PEM) orGITHUB_APP_PEM_FILE(path). Depends onopenssl,curl,jq,gh.gitea— Parent skill for Gitea SCM (repos, issues, PRs, releases, Actions, wiki). Routes togitea-teaandgitea-wiki. Prefer this — and thegiteaMCP server wired up in.mcp.json— overgh/GitHub for repos hosted on the team's Gitea instance.gitea-tea— Terminal operations via theteaCLI. Always invoke non-interactively with--outputand explicit args.gitea-wiki— Wiki page CRUD via thegitea-mcpserver (preferred) or REST API.teahas no wiki subcommands.kubernetes-reflector— Documents Kubernetes Reflector annotations for mirroring secrets and configmaps across namespaces. Documentation only — no scripts.minimax-image-generation— Generates images from MiniMax'simage-01model via/v1/image_generation. RequiresMINIMAX_API_KEY;MINIMAX_API_BASE_URLis optional. Depends oncurl,jq,base64.trebuchet— Drive the Trebuchet pentest API (start scans, poll status, retrieve findings). Scans run as K8s Jobs orchestrated by Temporal; typical duration ~36 min.
MCP
.mcp.json registers the gitea MCP server (https://git-mcp.farh.net/mcp) using ${GITEA_TOKEN} as a bearer. Skills that work against Gitea should prefer MCP tools over shelling out where an equivalent MCP call exists.
Key Patterns
- Standard Unix tools only (
openssl,curl,jq,base64). Any skill-specific runtime requirement (e.g.gh,tea) is declared in that skill'sSKILL.md. die()prints errors to stderr and exits non-zero.- Scripts validate required env vars up front and fail loudly rather than defaulting to
mktemp//tmpfor anything secret. AGENT_HOME/GH_CONFIG_DIRare the shared conventions for where session state (tokens, config) lives — new skills that persist credentials should write under one of these, not$HOME.
No Build/Test/Lint System
There is no centralized build, test, or lint tooling. Each skill is self-contained.