Agent skill

Hk Compound

by deepklarity in deepklarity/harness-kit

Compound a learning into a reusable pattern. An agent skill from deepklarity/harness-kit.

MITAuto-check: notesDevelopment

Install Hk Compound

skills CLI
$ npx skills add deepklarity/harness-kit --skill hk-compound -a claude-code

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

GitHub CLI
$ gh skill install deepklarity/harness-kit hk-compound --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/deepklarity/harness-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/hk-compound .claude/skills/hk-compound && 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
hk-compound
GitHub stars
100
Token cost
~1.7k tokens
SKILL.md length
616 words
Files
1
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

Compound a learning into a reusable pattern. An agent skill from deepklarity/harness-kit.

  • Works in 4 steps: Extract the pattern → Check for existing patterns → Write the pattern doc → …
  • : document this
  • SKILL.md covers The unit: a pattern, When to use, Context hint and Process, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Hk Compound is an agent skill from deepklarity/harness-kit. Compound a learning into a reusable pattern. Use after solving a non-trivial problem, discovering a principle worth reusing, or hitting a gotcha that would bite someone else. Triggers on: 'document this', 'capture this learning', 'that was tricky', 'let's compound this', 'compound this', or /hk-compound.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: A kit for building with AI agents and also the engineering patterns around it. The licence is MIT.

When your agent uses it

  • : document this
  • Capture this learning
  • That was tricky
  • Lets compound this

Example prompts

  • “document this”
  • “capture this learning”
  • “that was tricky”
  • “/hk-compound”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Edit, Write, Task, Grep, Glob

Workflow steps

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

  1. Extract the pattern
  2. Check for existing patterns
  3. Write the pattern doc
  4. Present result

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Edit
    • Write
    • Task
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and markdown).

    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

Hk Compound loads about 1.7k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 616 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Edit, Write, Task, Grep, Glob

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 deepklarity/harness-kit at commit 87305cd, republished under its MIT licence (© deepklarity). 616 words, ~1,729 tokens.

Download SKILL.mdSave it as .claude/skills/hk-compound/SKILL.md (or your agent's skills folder).
name
hk-compound
description
Compound a learning into a reusable pattern. Use after solving a non-trivial problem, discovering a principle worth reusing, or hitting a gotcha that would bite someone else. Triggers on: 'document this', 'capture this learning', 'that was tricky', 'let's compound this', 'compound this', or /hk-compound.
allowed-tools
Bash, Read, Edit, Write, Task, Grep, Glob
argument-hint
[optional: brief context about what to capture]

/hk-compound — Compound a Pattern

Extract the transferable principle from what just happened and add it to the pattern library. The goal is not to document an incident — it's to name a reusable pattern that gets richer over time as more instances accumulate under it.

The unit: a pattern

A pattern is a named, transferable principle. It starts lean — a clear statement and one instance. It grows as you encounter more cases. The value compounds because each new instance sharpens the principle and makes it easier to recognize next time.

This is not a post-mortem filing system. Don't capture "what happened." Capture "what's the reusable insight, and how would I recognize this situation again?"

When to use

  • You solved something and the principle behind the fix applies beyond this specific case
  • You noticed a recurring shape across multiple situations
  • You made a trade-off decision worth remembering the reasoning for
  • You hit a gotcha that has a recognizable signal before you fall into it

Skip it for: one-off fixes with no transferable insight, trivial config, things that are obvious once you know them.

Context hint

<context_hint> #$ARGUMENTS </context_hint>

If the context hint above is empty, scan the conversation for the most significant learning — the thing that took the most investigation or had the most non-obvious outcome. Focus on extracting the transferable principle, not recapping the incident.

Process

Step 1: Extract the pattern

Spawn a haiku subagent to analyze the conversation. The subagent returns text only — no file writes.

Task(model: haiku, subagent_type: general-purpose)

Prompt: "You have access to the full conversation context. Extract:

1. PATTERN NAME: A short, memorable name for the principle (e.g., 'Verify Preconditions Before Flags', 'Information Density via Progressive Disclosure'). Not a description of what happened — a name for the reusable idea.

2. THE PRINCIPLE: 1-3 sentences. The transferable insight stated clearly enough that someone unfamiliar with the specific situation would understand and be able to apply it. No jargon without explanation.

3. WHY IT MATTERS: 1-2 sentences. What goes wrong when you ignore this? What do you gain by following it? Be concrete.

4. THE SIGNAL: How would you recognize that this pattern applies? What does the situation look like right before you need this? (If unclear from a single instance, say so — this can be added later.)

5. THIS INSTANCE: A brief description of what happened in this conversation that surfaced the pattern. Include specifics — error messages, file paths, code snippets — but keep it to a few lines. Date it.

6. TAGS: 3-5 lowercase hyphenated keywords for grep discovery.

Be concrete and specific. No filler. If you can't articulate a transferable principle — if it's just 'we fixed X by doing Y' with no broader lesson — say so."

If the subagent can't find a transferable principle, tell the user and skip. Not everything needs to be compounded.

Step 2: Check for existing patterns

Search docs/patterns/ for related patterns:

Grep: pattern="<keywords from tags and pattern name>" path=docs/patterns/ output_mode=files_with_matches -i=true

Three outcomes:

  • Existing pattern matches: This is a new instance of that pattern. Go to Step 3a.
  • Related but different: Create a new pattern. Mention the related one in the doc.
  • Nothing related: Create a new pattern.
Step 3a: Add instance to existing pattern

Read the existing pattern file. Append the new instance under ## Instances. If the new instance sharpens the principle or clarifies the signal, update those sections too — patterns are living docs.

Then skip to Step 5.

Show full SKILL.md (261 more words)Show less
Step 3b: Create new pattern

File path: docs/patterns/<slugified-pattern-name>.md

No dates in filenames — patterns are living documents, not snapshots. Keep slugs short and descriptive.

bash
mkdir -p docs/patterns/

Write the file using the structure below.

Step 4: Write the pattern doc
markdown
tags: tag-one, tag-two, tag-three

# <Pattern Name>

<The principle. 1-3 clear sentences. This is the part someone would quote in a PR review or bring up in a design discussion. State it plainly — if a smart person reading this for the first time can't immediately understand what you mean, rewrite it.>

## Why it matters

<What goes wrong without this. What you gain with it. Keep it concrete — not "improves code quality" but "you'll spend 20 minutes debugging a misleading error message.">

## The signal

<How to recognize you're in this situation. What it looks like right before this pattern is relevant. This is what trains future-you to spot it early.>

## Instances

- **YYYY-MM-DD / short context label**: What happened. Specifics: error messages, the fix, file paths, code if relevant. A few lines per instance — enough to jog memory, not a full writeup.

Adapting the structure:

  • Every pattern needs the principle statement and at least one instance.
  • "Why it matters" and "The signal" are nudges, not mandates. If you only have one instance and the signal isn't clear yet, skip "The signal" — add it when a second instance clarifies the shape.
  • If the pattern benefits from a code example, add one inline. Don't force it.
  • If two patterns are related, mention each other with a simple see also: docs/patterns/other-pattern.md line.
Step 5: Present result

After writing or updating the file:

Done — docs/patterns/<filename>.md

<1-2 sentence summary: the pattern name and the core insight>

If you updated an existing pattern, mention that it now has N instances.

Quality bar

A good pattern doc passes this test: Could a teammate read just the pattern name and principle statement, and immediately know (a) what the idea is and (b) when to apply it?

Signals of a good pattern:

  • Pattern name is memorable and self-explanatory
  • Principle statement is quotable — you'd paste it in a code review
  • Instances are specific enough to jog memory but short enough to scan
  • Tags surface it when someone greps for the general area

Signals of a bad one:

  • It's really just a how-to for one specific situation (no transferable principle)
  • The principle is vague ("be careful with X") instead of actionable
  • It reads like a post-mortem instead of a reusable pattern
  • Filler phrases: "It's worth noting that...", "This approach ensures..."

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

Files

Just SKILL.md in .claude/skills/hk-compound of deepklarity/harness-kit.

Open the folder on GitHubat commit 87305cd

Compare with similar skills

Hk Compound 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.

Hk Compound compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hk Compound this skilldeepklarity/harness-kit100—~1.7kAutomated safety check: NotesMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from deepklarity/harness-kit

All 18 skills in this repo
  • Hk Skill Creator

    deepklarity/harness-kit

    Create new skills, modify and improve existing skills, and measure skill performance.

    100 GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Arch Audit

    deepklarity/harness-kit

    Run comprehensive agent-native architecture review with scored principles.

    100 GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Mock First

    deepklarity/harness-kit

    Mock-first, layer-by-layer feature development. An agent skill from deepklarity/harness-kit.

    100 GitHub stars~3.9k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Autonomy Audit

    deepklarity/harness-kit

    Audit whether an AI agent can autonomously close the loop on problems in a given area — from discovering a symptom to verifying a fix — without human intervention.

    100 GitHub stars~2.5k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Breadcrumb Creator

    deepklarity/harness-kit

    Traces a workflow end-to-end through the harness-kit monorepo and creates a breadcrumb analysis doc in docs/breadcrumbanalysis/.

    100 GitHub stars~3k tokensUpdated 2 mo ago
    Auto-check: notes
  • Hk Changelog

    deepklarity/harness-kit

    Generate changelog entries from git diffs, prepend to CHANGELOG.md, and optionally commit + PR.

    100 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check: notes

Categories

Questions about Hk Compound

What does Hk Compound do?

Compound a learning into a reusable pattern. An agent skill from deepklarity/harness-kit. Hk Compound is an agent skill from deepklarity/harness-kit. Compound a learning into a reusable pattern.

When should I use Hk Compound?

Hk Compound fits situations like: : document this; capture this learning; that was tricky; lets compound this.

How do I install Hk Compound in Claude Code?

Run `npx skills add deepklarity/harness-kit --skill hk-compound -a claude-code`. Or copy the skill folder (.claude/skills/hk-compound in deepklarity/harness-kit) into .claude/skills/hk-compound in your project. Claude Code loads it when a task matches its description.

How do I install Hk Compound in Codex?

Run `npx skills add deepklarity/harness-kit --skill hk-compound -a codex`. Or copy the skill folder (.claude/skills/hk-compound in deepklarity/harness-kit) into .agents/skills/hk-compound in your project. Codex loads it when a task matches its description.

Can I use Hk Compound 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 deepklarity/harness-kit --skill hk-compound -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hk-compound, .gemini/skills/hk-compound, .github/skills/hk-compound and .opencode/skills/hk-compound in your project.

What does Hk Compound need to run?

SKILL.md names no scripts, command-line tools or credentials: Hk Compound is instructions for the agent only. Its frontmatter pre-approves these tools: Bash, Read, Edit, Write, Task, Grep, Glob.

Does Hk Compound 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 Hk Compound safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Hk Compound use?

Hk Compound 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 Hk Compound use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hk Compound?

Skills that share tags, products or a category with Hk Compound: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hk Compound?

deepklarity (a GitHub organization) maintains it in deepklarity/harness-kit, which has 100 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on July 15, 2026.

Source: deepklarity/harness-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.