360 Secure SkillHub
360 安全技能中心

long-running-agent-harness

核心功能含项目脚手架初始化、编码会话启动、进度查看、功能添加及工作提交。适用于跨多轮Claude Code会话的长期编码项目,通过共享状态文件衔接跨会话进度,遵循增量开发原则,每次会话完成单个功能并确保代码可合并,帮助用户有序推进项目。

wenkangwei
wenkangwei
热度 40.60
最近更新 2026-05-11 17:40:07
分类:开发依赖:读写文件 / 内部调用大模型应用场景:DevOps / 自动化脚本 / 任务管理 / 代码生成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add long-running-agent-harness
Metadata
name
agent-harness
description
Long-running agent workflow automation. Initialize project scaffolding, manage feature lists, track progress across sessions, and orchestrate coding agents.
version
1.0.0
author
wwk
commands
["harness-init","harness-run","harness-status","harness-feature","harness-commit"]

Agent Harness Skill

Automates the long-running agent workflow from Anthropic's engineering blog. Manages feature lists, progress tracking, and session orchestration across multiple Claude Code sessions.

Commands

/harness-init

Initialize a new project with:

  • feature_list.json — comprehensive feature tracking
  • claude-progress.txt — cross-session progress log
  • init.sh — development server startup script
  • .harness.json — harness configuration

/harness-run

Start a coding session. Reads progress, picks the next feature, and follows the incremental development workflow.

/harness-status

Show current project progress: features completed, next features to implement, recent session history.

/harness-feature

Add a new feature to the feature list.

/harness-commit

Commit current work with structured message and update progress file.

Architecture

┌─────────────┐     ┌──────────────┐     ┌──────────────┐
│  Initializer │────▶│  Coding Agent│────▶│   Next Coding│
│    Agent     │     │  Session #1  │     │    Agent #2  │
└─────────────┘     └──────────────┘     └──────────────┘
      │                    │                     │
      ▼                    ▼                     ▼
┌─────────────────────────────────────────────────────────┐
│                    Shared State                          │
│  ┌───────────────┐ ┌──────────────┐ ┌────────────────┐ │
│  │feature_list   │ │claude-progress│ │   Git History  │ │
│  │    .json      │ │    .txt       │ │   (commits)    │ │
│  └───────────────┘ └──────────────┘ └────────────────┘ │
└─────────────────────────────────────────────────────────┘

Workflow

  1. Init: harness init "Build a chat app" — sets up project skeleton
  2. Code: harness run — each session picks ONE feature
  3. Track: Features marked passing only after end-to-end testing
  4. Commit: Progress documented in git + progress file
  5. Repeat: Continue until all features pass

Key Principles

  • Incremental: One feature per session
  • Tested: End-to-end testing before marking complete
  • Clean state: Always leave codebase merge-ready
  • Persistent state: Git + progress file bridge context windows