agentleFS
panayiotismpanayiotism/claude-harness/skills/setup/SKILL.md

setup

Skill79 starsChanged 4 months agoMITView on GitHub

Initialize, upgrade, or migrate the claude-harness plugin in a project. Use for first-time setup, plugin installation, version migration, memory directory configuration, legacy file cleanup, and project harness initialization.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-voice-transcription, add-discord and 10 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.
  • juancruzmunozalbeloSkill

    add-voice-transcription

    Add voice message transcription to NanoClaw using OpenAI's Whisper API. Automatically transcribes WhatsApp voice notes so the agent can read and respond to them.

    Also in 5 projects that use this

  • MicrosoftSkill

    add-discord

    Add Discord bot channel integration via Chat SDK.

    Also in 11 projects that use this

  • MicrosoftSkill

    add-slack

    Add Slack channel integration via Chat SDK.

    Also in 11 projects that use this

  • juancruzmunozalbeloSkill

    add-telegram-swarm

    Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".

    Also in 7 projects that use this

  • +8 more from microsoft

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 1 is distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 170 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Fallback: If the plugin root path is not available in the session context, fall through to Phase 1 -> Phase 4 (manual setup).

    line 35
  2. Very specific:

    Plugin updates: Run claude plugin update claude-harness to update the plugin itself.

    line 37
  3. Very specific:

    Read the current .gitignore file (create if missing)

    line 45
  4. Very specific:

    Check if .claude-harness/sessions/ pattern exists in the file

    line 47
  5. Very specific:

    If the pattern is NOT present, append these lines to .gitignore:

    line 49
  6. Very specific:

    Use the Edit tool to append these patterns to .gitignore

    line 59
  7. Very specific:

    Run /claude-harness:start to compile context and sync GitHub

    line 85
  8. Very specific:

    Use /claude-harness:flow "description" for end-to-end automated workflow (recommended)

    line 87
  9. Very specific:

    Use /claude-harness:flow --no-merge "description" for step-by-step control

    line 88
  10. Very specific:

    Use /claude-harness:flow --fix feature-XXX "bug" to create bug fixes

    line 89

“Common” is measured: kept by at least 6 in 10 of the 170 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

Setup - Initialize or Upgrade Claude Harness

Initialize or upgrade claude-harness in the current project directory.

Auto-Detection

This command automatically detects what needs to be done:

  • Fresh install: Creates v3.0 structure from scratch
  • v2.x upgrade: Migrates existing files to v3.0 memory architecture
  • Cleanup: Removes legacy command copies from .claude/commands/ (commands are now served from plugin cache)

Note: Commands and hooks are served from the plugin cache. setup.sh only initializes project-level state (memory directories, CLAUDE.md, .gitignore, migrations).

Phase 0: Run setup.sh (Handles ALL Cases)

setup.sh handles fresh installs, v2.x migrations, and cleanup in a single script. Always run it.

Steps:

  1. Find the plugin root path from the session context (look for "Plugin Root:" in the session start context)
  2. Run: bash {plugin-root}/setup.sh
    • Fresh install: Creates v3.0 structure, .gitignore patterns, CLAUDE.md
    • v2.x migration: Detects legacy files, migrates to v3.0 structure, then creates missing files
    • Cleanup: Removes stale command copies from .claude/commands/ and legacy hooks
    • Existing project files are NEVER overwritten (skipped automatically)
    • .gitignore patterns are added if missing
  3. Report what was created vs what was skipped
  4. Skip Phase 3 -- setup.sh handles it

Fallback: If the plugin root path is not available in the session context, fall through to Phase 1 -> Phase 4 (manual setup).

Plugin updates: Run claude plugin update claude-harness to update the plugin itself.

Phase 3: Update Project .gitignore (FALLBACK -- only if setup.sh unavailable)

CRITICAL: You MUST update the project's .gitignore to exclude harness ephemeral files. This prevents uncommitted file clutter after /checkpoint.

Execute these steps:

  1. Read the current .gitignore file (create if missing)
  2. Check if .claude-harness/sessions/ pattern exists in the file
  3. If the pattern is NOT present, append these lines to .gitignore:
    # Claude Harness - Ephemeral/Per-Session State
    .claude-harness/sessions/
    .claude-harness/memory/compaction-backups/
    
    # Claude Code - Local settings
    .claude/settings.local.json
  4. Use the Edit tool to append these patterns to .gitignore
  5. Report: "Updated .gitignore with harness ephemeral patterns"

DO NOT SKIP THIS PHASE - it is required for proper harness operation.

File Schemas

Canonical schemas are defined in the plugin's schemas/ directory (JSON Schema format). Key state files:

FileSchemaCreated By
sessions/{id}/context.jsonschemas/context.schema.json (v3)Phase 1 context compilation
sessions/{id}/loop-state.jsonschemas/loop-state.schema.json (v9)Phase 4 implementation
sessions/{id}/autonomous-state.jsonschemas/autonomous-state.schema.json (v4)--autonomous mode
features/active.jsonschemas/active-features.schema.json (v3)Phase 2 feature creation

Memory knowledge layers (memory/decisions/, failures/, successes/, patterns/, rules/) are an OKF v0.1 bundle -- markdown concept files with YAML frontmatter, not JSON. Their conformance rules are documented in schemas/okf-memory.md and checked by scripts/check-okf.py; setup.sh migrates legacy JSON memory files to the bundle automatically (stamp-gated). Semantic memory (memory/semantic/*.json) and runtime state stay JSON with v3 schemas as created by setup.sh.

After Setup

Report:

  • What was done (fresh install / migration / version update)
  • Files created or migrated
  • Current plugin version
  • Next steps:
    1. Run /claude-harness:start to compile context and sync GitHub
    2. For new projects: Run /claude-harness:prd-breakdown @./prd.md to analyze PRD and extract features
    3. Use /claude-harness:flow "description" for end-to-end automated workflow (recommended)
    4. Use /claude-harness:flow --no-merge "description" for step-by-step control
    5. Use /claude-harness:flow --fix feature-XXX "bug" to create bug fixes

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.