Agent skill

Closed Loop

by huytieu in huytieu/COG-second-brain

Run one task through the V-model verification loop: CP-2 plan → CP-3 build → CP-3v component verify → CP-4 integration verify (full lane) → CP-5 acceptance.

MITAuto-check passedProduct & Project Management

Install Closed Loop

skills CLI
$ npx skills add huytieu/COG-second-brain --skill closed-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install huytieu/COG-second-brain closed-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/huytieu/COG-second-brain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/closed-loop .claude/skills/closed-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
closed-loop
GitHub stars
1.3k
Token cost
~1.2k tokens
SKILL.md length
441 words
Files
3 (incl. references)
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Run one task through the V-model verification loop: CP-2 plan → CP-3 build → CP-3v component verify → CP-4 integration verify (full lane) → CP-5 acceptance.

  • Works in 8 steps: Lane + run folder → CP-1 Spec (acceptance criteria) → CP-2 Plan → …
  • Product & Project Management work in your project
  • SKILL.md covers When to use, Phase 0 — Lane + run folder, Phase 1 — CP-1 Spec… and Phase 2 — CP-2 Plan, plus 7 more sections
  • Calls bash

What it does

Closed Loop is an agent skill from huytieu/COG-second-brain. Run one task through the V-model verification loop: CP-2 plan → CP-3 build → CP-3v component verify → CP-4 integration verify (full lane) → CP-5 acceptance. The worker never grades its own homework; evidence rows trace back to AC-n. Opt-in: invoke with /closed-loop or by asking for the closed loop, proper verification, or an evidence trail. Ordinary work does not run this.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/spec-template.md`).

It sits in Product & Project Management. The repository describes itself as: Self-evolving second brain with 35 AI skills, 10 agents, and people CRM. Closed-loop harness: a V-model verification lifecycle where the worker never grades its own homework… The licence is MIT.

When your agent uses it

  • Product & Project Management work in your project

Example prompts

  • “/closed-loop”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Lane + run folder
  2. CP-1 Spec (acceptance criteria)
  3. CP-2 Plan
  4. CP-3 Build
  5. CP-3v Component verify
  6. CP-4 Integration verify (full or multi-task)
  7. CP-5 Acceptance (post-condition)
  8. Record + handoff

What it can do on your machine

Read from SKILL.md and the folder at commit 36ac9d7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Closed Loop loads about 1.2k tokens when it runs, and up to ~2.8k if it reads all its reference files. Until then it costs about 97 tokens; SKILL.md has 441 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from huytieu/COG-second-brain at commit 36ac9d7, republished under its MIT licence (© huytieu). 441 words, ~1,184 tokens.

Download SKILL.mdSave it as .claude/skills/closed-loop/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
closed-loop
description
Run one task through the V-model verification loop: CP-2 plan → CP-3 build → CP-3v component verify → CP-4 integration verify (full lane) → CP-5 acceptance. The worker never grades its own homework; evidence rows trace back to AC-n. Opt-in: invoke with /closed-loop or by asking for the closed loop, proper verification, or an evidence trail. Ordinary work does not run this.

Closed-loop execute (V-model right arm)

Mechanical verification pipeline. Every verify step emits evidence rows tied to acceptance criterion IDs (AC-n).

When to use

The harness is opt-in. Run it when:

  • Invoked as /closed-loop <task> or /closed-loop <spec-path>.
  • The user asks for the closed loop, proper verification, or an evidence trail.
  • verification_harness: on in 00-inbox/MY-PROFILE.md and this is a build task.
  • Another skill that declares a normal+ lane reaches its verify step.

Do not run it on a request that did not ask for it. Notes, briefs, research, drafts, and ordinary edits are not harness runs, and a checkpoint ledger on those is pure overhead.

Phase 0 — Lane + run folder

bash
bash .claude/lib/lane-classify.sh explain "<task>"
bash .claude/lib/checkpoint.sh init 04-projects/harness/runs/<YYYY-MM-DD-HHmm>
LaneCheckpoints
tinyCP-3 → CP-5 (if mutating)
normalCP-1 → CP-2 → CP-3 → CP-3v → CP-5
full+ CP-4 + claim-verifier + CP-6
bugroot-cause ledger (CP-0) before CP-3

Record: checkpoint.sh record <run-dir> CP-0 PASS|SKIP "<lane>"

Phase 1 — CP-1 Spec (acceptance criteria)

If spec exists, use its ## Acceptance criteria + traceability matrix. Else write:

04-projects/harness/runs/<id>/criteria.md using references/spec-template.md (criteria + matrix sections only).

Each criterion: falsifiable + AC-n ID + verify method.

Record: checkpoint.sh record <run-dir> CP-1 PASS "N criteria"

Phase 2 — CP-2 Plan

Map tasks → AC IDs in evidence/CP-2-plan.md. Update matrix status to pending.

Record: checkpoint.sh record <run-dir> CP-2 PASS

Phase 3 — CP-3 Build

Worker implements. Returns deliverable path only.

Phase 4 — CP-3v Component verify

retry=0
loop:
  spawn task-verifier (fresh context, read-only)
  merge EVIDENCE rows into evidence/ledger.md
  if PASS → break
  if FAIL:escalate → record CP-3v FAIL, escalate
  if FAIL:fixable && retry < 2 → fix-agent → retry++
  else → escalate

Copy verifier EVIDENCE rows into evidence/CP-3v-component.md.

Record: checkpoint.sh record <run-dir> CP-3v PASS|FAIL

Phase 5 — CP-4 Integration verify (full or multi-task)

Spawn integration-verifier (read-only). Append rows to ledger.

Skip for single-task normal.

Record: checkpoint.sh record <run-dir> CP-4 PASS|SKIP

Show full SKILL.md (190 more words)Show less

Phase 6 — CP-5 Acceptance (post-condition)

For each mutation, observe artifact (curl, screenshot, re-fetch). Emit:

EVIDENCE AC-n | CP-5 | PASS | <observation> | <artifact>

UI/UX flow changes: the post-condition is visual. Screenshot every meaningful state with whatever browser tooling the environment has, then read the image and confirm no overflow, misalignment, clipping, wrong color, or broken responsive layout before PASS. The Observation must describe what you saw; the artifact is the screenshot/GIF in evidence/. Fix any visual defect and re-capture. See CLAUDE.md → Visual Verification.

Write evidence/CP-5-acceptance.md. Traceability closure: every AC in matrix has ≥1 PASS row in ledger.

Record: checkpoint.sh record <run-dir> CP-5 PASS|FAIL

Phase 7 — Record + handoff

  • Append to .claude/logs/loop-ledger.tsv
  • Update spec traceability matrix statuses to verified
  • full lane / big task: generate an HTML rollup from references/report-template.html → 04-projects/harness/runs/<id>/report.html, filled from criteria.md + evidence/ledger.md (criteria, AC traceability, verifier verdicts, post-condition observations). Self-contained; SendUserFile it or publish as an Artifact. Skip for normal/tiny.
  • Suggest /retro <run-dir> for CP-7

Integration

SkillLaneCP-4
ultragoalfull per phase (never downgraded)integration-verifier + north-star acceptance
team-brieffullclaim-verifier
comprehensive-analysis, auto-researchfullclaim-verifier on cited claims
content-factorynormalskip
review-cockpitnormalskip; CP-6 is the user's approval per card

Escalation template

ESCALATED — <task>
Lane: <lane> | Last CP: <CP-n>
Evidence bundle: 04-projects/harness/runs/<id>/evidence/
Open AC IDs: <list without PASS rows>
Decision needed: <one question>

© huytieu, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/closed-loop of huytieu/COG-second-brain.

  • SKILL.md
  • references/report-template.html
  • references/spec-template.md

Open the folder on GitHubat commit 36ac9d7

Compare with similar skills

Closed Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Closed Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Closed Loop this skillhuytieu/COG-second-brain1.3k—~1.2kAutomated safety check: PassMIT
User Story Writerdeanpeters/Product-Manager-Skills7.2k2 repos~2.9kAutomated safety check: PassCustom licence
Game Changing FeaturesopenstatusHQ/data-table-filters2.3k3 repos~2.1kAutomated safety check: PassMIT
CCPM Project Managementautomazeio/ccpm8.4k—~1.1kAutomated safety check: PassMIT
Convex Create Componentspokvulcan/poker-planning1148 repos~2.6kAutomated safety check: PassMIT
Self Improving Agentfarm-fe/farm5.6k2 repos~3.3kAutomated safety check: NotesMIT

Similar skills

  • User Story Writer

    deanpeters/Product-Manager-Skills

    Writes user stories in Mike Cohn's format with Gherkin acceptance criteria, turning user needs into development-ready work with testable conditions.

    7.2k GitHub starsUsed in 2 repos~2.9k tokens
    Product & Project ManagementAuto-check passed
  • Game Changing Features

    openstatusHQ/data-table-filters

    Find 10x product opportunities and high-leverage improvements.

    2.3k GitHub starsUsed in 3 repos~2.1k tokens
    Product & Project ManagementAuto-check passed
  • Runs a spec-driven workflow from PRD to epic to GitHub issues to parallel agents, with status, standup and blocked-work reports from bundled scripts.

    8.4k GitHub stars~1.1k tokensUpdated 6 mo ago
    Product & Project ManagementAuto-check passed
  • Convex Create Component

    spokvulcan/poker-planning

    Builds reusable Convex components with isolated tables and app-facing APIs.

    114 GitHub starsUsed in 8 repos~2.6k tokens
    Product & Project ManagementAuto-check passed
  • A universal self-improving agent that learns from ALL skill experiences.

    5.6k GitHub starsUsed in 2 repos~3.3k tokens
    Product & Project ManagementAuto-check: notes
  • Builds a weekly engineering retrospective from git history: commit counts, per-person contributions, work patterns and code quality numbers over a chosen window.

    136k GitHub stars~2.4k tokensUpdated today
    Product & Project ManagementAuto-check passed

More from huytieu/COG-second-brain

All 37 skills in this repo
  • Voice Baseline

    huytieu/COG-second-brain

    Measure your own writing corpus for the words and sentence shapes you over-use, so an agent writing in your voice stops amplifying your tics into a style.

    1.3k GitHub stars~957 tokensUpdated 5 days ago
    Auto-check passed
  • Daily Journal

    huytieu/COG-second-brain

    A passive daily work journal that Claude keeps FOR you so you never have to write it yourself.

    1.3k GitHub stars~1.3k tokensUpdated 5 days ago
    Auto-check passed
  • Editorial Illustrations

    huytieu/COG-second-brain

    Generate meaning-carrying editorial data-illustrations in the monotykamary / Linear aesthetic (near-black grayscale, Inter display + mono labels, hairline framed figures) with a single coral accent.

    1.3k GitHub stars~2.4k tokensUpdated 5 days ago
    Auto-check passed
  • Loop Engineering

    huytieu/COG-second-brain

    Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns.

    1.3k GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed
  • Knowledge Consolidation

    huytieu/COG-second-brain

    Build frameworks from scattered insights across all braindumps and notes

    1.3k GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • Release Video

    huytieu/COG-second-brain

    Turn a product release (the list of shipped items plus real screen recordings) into a motion recap video and one explained demo per feature, with sound effects tied to on-screen motion and a…

    1.3k GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed

Questions about Closed Loop

What does Closed Loop do?

Run one task through the V-model verification loop: CP-2 plan → CP-3 build → CP-3v component verify → CP-4 integration verify (full lane) → CP-5 acceptance. Closed Loop is an agent skill from huytieu/COG-second-brain. Run one task through the V-model verification loop: CP-2 plan → CP-3 build → CP-3v component verify → CP-4 integration verify (full lane) → CP-5 acceptance.

When should I use Closed Loop?

Closed Loop fits situations like: product & Project Management work in your project.

How do I install Closed Loop in Claude Code?

Run `npx skills add huytieu/COG-second-brain --skill closed-loop -a claude-code`. Or copy the skill folder (skills/closed-loop in huytieu/COG-second-brain) into .claude/skills/closed-loop in your project. Claude Code loads it when a task matches its description.

How do I install Closed Loop in Codex?

Run `npx skills add huytieu/COG-second-brain --skill closed-loop -a codex`. Or copy the skill folder (skills/closed-loop in huytieu/COG-second-brain) into .agents/skills/closed-loop in your project. Codex loads it when a task matches its description.

Can I use Closed Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add huytieu/COG-second-brain --skill closed-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/closed-loop, .gemini/skills/closed-loop, .github/skills/closed-loop and .opencode/skills/closed-loop in your project.

What does Closed Loop need to run?

Going by SKILL.md and its folder, Closed Loop needs the command-line tools its instructions call (bash).

Does Closed Loop access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Closed Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Closed Loop use?

Closed Loop is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Closed Loop use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Closed Loop?

Skills that share tags, products or a category with Closed Loop: User Story Writer (deanpeters/Product-Manager-Skills, 7.2k stars), Game Changing Features (openstatusHQ/data-table-filters, 2.3k stars), CCPM Project Management (automazeio/ccpm, 8.4k stars) and Convex Create Component (spokvulcan/poker-planning, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Closed Loop?

huytieu (a GitHub user) maintains it in huytieu/COG-second-brain, which has 1,260 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 2, 2026.

Source: huytieu/COG-second-brain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.