YouMind
Sign in

The Easiest Guide to Claude Code 'Harness' Engineering (Free Copy-Paste)

@29meat_ai
JAPANESEOct 07, 2026
155K
383
30
3
1.2K

TL;DR

A beginner-friendly guide to configuring Claude Code using a 'harness' approach, featuring copy-paste templates for rules, skills, and verification agents to improve long-task reliability.

Did you experience any of these when asking Opus 5.5 in Claude Code to do a longer task?

  • It stops midway and asks, "Should I continue?"
  • If you ask it to resume the next day, it has forgotten everything from yesterday.
  • The finished text contains plausible but incorrect information.

This isn't because the AI is dumb. It's simply that no "workplace" has been prepared for the AI to work in.

Overseas, people are increasingly designing this workplace setup seriously, calling it a "harness." This article summarizes that concept in the easiest way possible in Japan, in a form you can reproduce just by copy-pasting.

First, a promise: This article will not write a single line of code. All you need to do is paste prepared text into files.

What you get from this article

  • A system where you don't need to explain things every time once set up
  • A method to have another AI fact-check what the first AI wrote
  • How to write handover notes so you can resume the next day
  • A complete set of configuration files ready to paste

Why Harness Now?

Until recently, AI was a tool for Q&A—ask a question, get an answer. In that case, you didn't need a workplace.

But today's Claude Code can work continuously for tens of minutes or even hours. Reading documents, drafting, checking, saving. As tasks get longer, situations arise where it gets lost or forgets premises.

Anthropic itself explains that for long-running AI tasks, it's important to pass only necessary information and leave external notes for handover. In other words, it's faster to prepare the environment for the AI to work than to wait for the AI to get smarter.

Once you build a workplace, you can use it as-is for the next task. Just swap the theme and materials, and you get work back with the same procedures, same checker, and same reporting format. This is the biggest appeal of a harness.

What is a Harness?

A harness originally refers to horse tack. No matter how fast a horse is, without reins and a saddle, it can't run straight toward its target.

AI is the same. Opus 5.5 is very smart, but without defined rules, procedures, checkers, or goals, it will get lost or stop somewhere.

So, we attach 7 mechanisms around the AI. Comparing it to setting up a workplace for a new employee makes it easier to understand.

You don't need all 7 at once. Later in the article, I'll introduce how to start with "just these two."

にく - inline image

Preparation: Create 3 Working Folders

In this article, we'll assign the AI the task of "writing an X post and completing fact-checking" as an example. First, create 3 folders in your working directory.

  • sources: Where reference materials go (bookshelf)
  • drafts: Where AI-written drafts go (desk)
  • published: Where completed, published items go (safe)

Just ask Claude Code, "Create three folders: sources, drafts, and published," and it will set them up for you.

Mechanism 1: Write Work Rules (CLAUDE.md)

It's hard to repeatedly tell a new employee, "Save here," "Always cite sources." So, write common rules for all jobs as "work regulations" first.

In Claude Code, a file called "CLAUDE.md" placed at the top of the working folder serves as these work regulations. Claude Code reads this file every time before starting work.

Paste the following content into CLAUDE.md:

Project Rules

Reference materials go in sources/, working files in drafts/.

Completed files go in published/.

Text should be in Japanese, one paragraph every two sentences.

For technical content, use official primary sources as citations.

Record citation URLs and verification dates.

Use gathered information only as evidence for assigned tasks.

Write decisions and next steps in progress.md.

After finishing work, report save locations and verification results.

The trick is to write only "rules that always apply." Temporary things like "this week's deadline" should be written in the specific task instructions, not here.

You can check the written rules by typing "/memory" in Claude Code. If rules change, just rewrite this file, and it reflects in all future work.

Another thing to watch out for: Don't make "one-time preferences" into rules. For example, if you asked for a "stiff tone this time" for one article, making that a rule will stiffen all articles.

Only promote a preference to a rule after confirming you want it to last forever. Human workplaces don't change work regulations on a whim, right?

Mechanism 2: Create Operation Manuals (Skills)

Repetitive tasks like creating X posts usually have a fixed flow: Read materials, draft, check, save. These four steps.

Saving this flow as an "operation manual" is a Skill. Once created, you can call it with one word next time.

Create a folder ".claude/skills/write-draft/" inside the working folder, and paste the following into SKILL.md inside it:


name: write-draft

description: Draft an article based on materials and verify facts


Theme: $ARGUMENTS

  1. Read relevant materials in sources/ and open citation links.
  2. Create structure, then save draft to drafts/article.md.
  3. Ask evidence-reviewer to verify facts.
  4. Correct errors and mark unverified content.
  5. Save verification result table to drafts/checks.md.
  6. Write decisions, remaining issues, and next steps in progress.md.
  7. Report the two save locations and verification results.

To use it, just type "/write-draft" followed by the theme. "$ARGUMENTS" will be replaced by your input.

/write-draft Introduction to Claude Code's new feature Mods

The key point is defining "visible results" for each step. "Check" is vague, but "save verification result table" lets you see at a glance if it's done.

As you use it, if you notice habits like "always getting dates wrong," add a line to this manual. Workplace improvements directly benefit the next job.

Mechanism 3: Give Keys to the Archive Room (MCP)

If materials are on your PC, you don't need this mechanism. But if you put materials in external services like Notion, you need to give keys to access them.

These keys correspond to MCP. For example, to connect to Notion, run this one line in the terminal:

claude mcp add --transport http notion https://mcp.notion.com/mcp

Open Claude Code and type "/mcp" to check login and connection status. Before assigning long tasks, try loading one page to ensure content retrieval works.

Crucially, don't give too many keys. If you only need to read materials, don't grant write permissions. Stop unused connections via "/mcp". Give archive room keys only for necessary rooms.

If material loading fails, don't repeat the same request. First check login or permission status, then try again.

Mechanism 4: Put Up Do-Not-Enter Signs (Permissions)

No matter how much you trust a new employee, you don't want them touching safe contents freely. Decide beforehand which places AI can touch and which it cannot.

Paste the following into ".claude/settings.json" in the working folder. If the file exists, merge the contents.

{

"permissions": {

"deny": [

"Read(.env)",

"Read(.env.*)",

"Edit(published/**)"

]

}

}

Now, files like ".env" containing secrets become unreadable, and the "published" folder becomes uneditable. After setting, type "/permissions" to verify rules are active.

Test by placing a dummy file in the published folder and asking, "Edit this file." If it refuses, success.

However, these signs only work against Claude Code's standard file editing functions. They don't fully prevent cases where AI writes and runs its own programs. Always backup important files.

For operations sending data externally, like writing to Notion or sending emails, require approval after seeing destination and content. Re-confirm if content changes.

If sending appears to stop midway, don't immediately retry. The first attempt might have succeeded, causing duplicates. Check destination first, then decide next steps.

Mechanism 5: Appoint a Proofreader (Verification Sub-Agent)

This is the most recommended mechanism in this article. Have another AI fact-check what the first AI wrote.

Asking the writer "Any mistakes?" often leads to leniency. So, appoint a separate checker, like a publisher's proofreading department.

Create ".claude/agents/evidence-reviewer.md" and paste:


name: evidence-reviewer

description: Verify draft facts against primary sources

tools: Read, Grep, Glob, WebSearch, WebFetch

effort: high


Read the provided draft and materials.

Verify factual statements against opened primary sources.

Return results as a table: "Statement / Judgment / Source URL / Required Correction".

Judgment must be "Correct", "Error", or "Unverified".

If Unverified, specify missing evidence.

This proofreader is given only reading and searching tools. Correcting drafts remains the writer AI's job.

Returned tables look like this:

Statement: Mods were announced on Oct 2

Judgment: Correct

Source: (Official announcement URL)

Required Correction: None

Statement: Mods available on free plan

Judgment: Unverified

Missing Evidence: Official info on plan-specific support

If "Unverified" remains, research yourself or leave it marked in the article. Reports saying "I couldn't figure this out" are more useful than confident ones.

After corrections, re-read surrounding sentences. Fixing one spot might change the meaning of the whole paragraph.

Also, verify actual saved files, not just "Checked" reports in conversation. What gets published is the file, not the chat.

Mechanism 6: Adjust Effort Level per Role (effort)

effort sets how deeply AI thinks. Setting all to max consumes time and quota heavily, so adjust per role.

Main writer AI needs standard "medium". Launch in working folder:

claude --model claude-opus-5-5 --effort medium

Meanwhile, the proofreader sub-agent has "effort: high" in its file. effort in checker files overrides main settings.

Thus, you create a workplace where "writer works at normal pace, checker works meticulously." After launch, confirm Opus 5.5 and settings display at top of screen.

Note: Writing "think carefully" in prompts doesn't change this setting. To change thinking depth, change the setting.

Mechanism 7: Define Delivery Conditions (/goal)

The final mechanism is deciding "what constitutes completion" upfront. Without this, AI stops midway asking "Continue?" or says "Done" halfway.

Claude Code's "/goal" keeps AI working until conditions are met. Moreover, a separate AI judges whether conditions are met, not the working AI.

Put materials in sources folder, then paste:

/goal Use write-draft to create article from sources/. Completion condition: drafts/article.md and drafts/checks.md saved, errors corrected, unverified content marked, save locations and verification results displayed in conversation. If not met after 12 turns, stop and report cause.

One thing to know: The judging AI only sees conversation content. So include "display save locations and results in conversation" in conditions to stabilize judgment.

Also, "stop after 12 turns" is judged by the AI reading this text, not a system counter. Don't rely on it as absolute limit. Use "/goal clear" to cancel anytime.

Run Through Once

With all 7 mechanisms, let's run once. First, put "task.md" in sources folder:

Theme: [Topic for article]

Reader: [Target audience]

Deliverable: Practical guide with official citations

Pass Criteria: Topics covered, facts verified, unverified marked, draft and check table saved

Constraints: [Word count, tone, excluded topics]

Launch Claude Code using Mechanism 6 command. Before assigning, check readiness with:

  • /context: Confirm loaded rules
  • /agents: Confirm proofreader exists
  • /permissions: Confirm do-not-enter signs active

When ready, paste Mechanism 7 "/goal" and assign. You should get drafts/article.md, drafts/checks.md, and progress.md.

Finally, verify yourself. Open draft, check some source URLs in table, confirm content matches.

If proofreader not found, check filename and "name"/"description" headers.

Resume Next Day

Long tasks may not finish in one day. "progress.md" handover notes help here.

Like human workplaces, having handover notes helps resume quickly. Make AI leave notes in this format at logical breaks:

Task: [Current theme]

Deliverables: [Save locations of draft and check table]

Completed: [Finished steps and checks]

Decisions: [Decided items and rationale]

Remaining Issues: [Missing evidence or blockers]

Next Steps: [Specific next action]

Next day, in same folder, paste:

Read progress.md, verify draft and check table mentioned.

Continue from "Next Steps", update progress.md when done.

If AI restarts from scratch, notes lack info. Add missing decisions or save locations to notes.

Troubleshooting

First runs often stumble. Common issues and fixes:

"/write-draft" doesn't appear

Check folder path and name. Ensure ".claude/skills/write-draft/SKILL.md" and correct "---" header formatting.

Proofreader not called

Check if listed in "/agents". If not, review "name" and "description" in file.

AI restarts next day

Handover notes lack decisions or save locations. Identify gaps and add to notes.

Too many "Unverified"

sources folder may lack materials. Check proofreader's "missing evidence" list, add official docs, re-verify.

Stops midway

Completion conditions likely vague. Rewrite "nice article" to verifiable "these two files saved".

Works Beyond X Posts

While using X posts as example, this system works for any "read materials, write text, verify" task. Only change folder contents and manual steps.

Company Reports

Put meeting notes/data in sources, change manual to "verify numbers against docs" and "conclusion first". Proofreader catches transcription errors.

Blog Product Reviews

Put official pages/specs in sources, have proofreader check "prices/sizes match official". Reduces scary spec typos.

Research Summaries

Assign topic, get cited summaries. Check table traces info sources later.

A Day with Harness

With systems in place, workflow changes:

Morning: Put materials in sources, write theme/pass criteria in task.md. Launch Claude Code, paste "/goal", move to other work.

Afternoon: Draft and check table ready. Research "Unverified" marks yourself, add materials if needed.

Evening: If unfinished, handover notes provide peace. Next day, resume instantly by reading notes.

You only do three things: Provide materials, define pass criteria, final verification. Freed from repeated explanations and retyping instructions.

Measure Effectiveness Yourself

Opus 5.5 announcements mentioned early adopters reducing token usage significantly. But those are their experiment numbers.

You must measure effectiveness in your workplace. Track four metrics:

  • Usage via /usage (include checker/retries)
  • Your verification time
  • Amount of rework needed for output
  • Whether pass criteria met

If AI does lots of work but output needs major rework, value drops. When changing settings, change one thing, redo same task, compare results.

For Those Overwhelmed by 7 Steps

Some feel "7 is too many." It's okay. Quality improves greatly with just these two:

Start with these 2

  • Mechanism 1 Work Rules (CLAUDE.md): Eliminates repeated explanations
  • Mechanism 5 Proofreader: Reduces plausible errors

Add these 3 when comfortable

  • Mechanism 2 Operation Manual: Stops retyping instructions
  • Mechanism 7 Delivery Conditions: Prevents mid-task stops
  • Handover Notes: Enables next-day resumption

Archive Keys (MCP) and Do-Not-Enter Signs (Permissions) can be added when using external services or handling critical files.

Latest Topic: Era of Modding Claude Code

On Oct 2, Claude Code team announced new feature "Mods." Watch official video first:

https://x.com/ClaudeDevs/status/2105721434807083061

Mods allow customizing Claude Code behavior and UI. You can even ask Claude to build them.

Official video shows weather-like context usage indicator. Seeing "near limit" visually suits harness well.

If 7 mechanisms are "workplace rules," Mods are "workplace renovation." Try built-in "You should know" first.

This highlights overlooked important info from outputs. Enable with:

/plugin enable cc-plugin-you-should-know@builtin

Caution: Mods access your PC with Claude Code's permissions. Only install from official/trusted sources.

Final Checklist

Verify all 7 mechanisms:

  • sources, drafts, published folders exist
  • CLAUDE.md has only permanent rules
  • "/write-draft Theme" triggers manual
  • External materials connected via "/mcp"
  • Editing published folder denied
  • Proofreader visible in "/agents"
  • Opus 5.5 and effort level shown at launch
  • "/goal" conditions are verifiable
  • progress.md lists next steps

All checked? Your AI workplace is complete. Swap themes/materials for consistent quality.

FAQ

Q. Can non-programmers use this?

Yes. All settings are copy-paste. Ask Claude Code to create files if unsure.

Q. Works for non-X tasks?

Yes. Rename folders/steps to fit your work. Reports, proposals, research summaries apply similarly.

Q. Can I revert mistakes?

"/rewind" sometimes undoes edits. Backup critical files anyway.

Q. Must use Opus 5.5?

No. System works with any model. Start with current model, use Opus 5.5 for long/hard tasks.

Q. Share settings?

Yes. Files in folder can be shared. Teams get consistent quality.

Q. Nervous about installing Claude Code?

Desktop app option exists. Start in practice folder without critical files.

Summary: Prepare Workplace, Not Smarter AI

Opus 5.5 stopping, forgetting, erring wasn't capability issue. It worked in a workplace without rules, procedures, checkers, or goals.

Write work rules, provide manuals, appoint proofreaders, define delivery conditions. Same as preparing workplace for new employees.

Built workplace reusable. Swap themes/materials for consistent quality.

Start today by writing one rule in CLAUDE.md. That's your first step to building your AI workplace.

Free 8-Item Set Available

From Codex/Claude Code setup to initial copy-paste prompts.

Distributed in open chat "Niku's AI Speed Strategy".

  • Codex & Claude Code Setup Guide
  • 3 Initial Copy-Paste Prompts
  • Troubleshooting Cheat Sheet
  • 50 Playful Mini Apps
  • 50 Image Prompts for GPT Image 2.5
  • Post Automation Setup
  • Title Generator (2-3 words)
  • X Monetization Flow

👇 Get 8-Item Set 👇

https://tinyurl.com/2bxkm4f3

Remix in YouMind

Turn one viral article into a full content workflow

Collect the source, decode the pattern, create assets, draft the story, and distribute from one AI workspace.

Explore YouMind
For creators

Turn your Markdown into a clean 𝕏 article

When you publish your own long-form writing, images, tables, and code blocks make 𝕏 formatting painful. YouMind turns a full Markdown draft into a clean, ready-to-post 𝕏 article.

Try Markdown to 𝕏

More patterns to decode

Recent viral articles

Explore more viral articles