HumanLayer Skills: instruction preservation and reviewable control loops
HumanLayer Skills operations: protect instruction files, branch trust and durable memory
Review persistent guidance and CI credentials as consequential changes, not harmless text, and preserve task scope through iteration and recovery.
What you will learn
- Repository guidance is a persistent behavior change
- A maintainer comment does not make all fetched context trusted
- Make state loss and broad writes visible
Before you start
- Repository instructions and basic GitHub Actions concepts
- Understanding of review scope and persistent agent context
Design a bounded, inspectable workflow and distinguish template assumptions from tested behavior.
Key takeaways
- Instruction and memory edits can change future behavior.
- Routing checks do not sanitize every PR comment or branch.
- Missing policy and broad staging should not be hidden.
Repository guidance is a persistent behavior change
Rewriting CLAUDE.md affects future agent context, while editing a loop memory file can influence later automated runs. Review these changes as operational policy, even though they are Markdown. Preserve approved scope exclusions and publishing constraints rather than optimizing solely for brevity.
The instruction-cleanup skill’s conditional blocks are a proposed relevance technique, not a security boundary. Do not place untrusted document instructions into authoritative guidance without review. A concise file that weakens a release restriction is not an improvement merely because it is easier to read.
A maintainer comment does not make all fetched context trusted
The template gates iteration comments by association and workflow marker, then the helper includes PR bodies and other comments in the agent prompt. Those additional texts may come from different authors. Keep the current authorized request distinct from material supplied as evidence, and do not let quoted context silently redefine the task.
Before exposing secrets to an iteration run, verify the branch and scripts that will execute. The skeleton checks out a PR head reference and then installs dependencies and runs repository code. Its preflight is useful routing, but it is not a complete adversarial review of that execution path.
Make state loss and broad writes visible
The helper treats unreadable memory as empty, while the workflow contains broad staging in an iteration path. Both choices need explicit review for the target repository. A safer adaptation can fail on unavailable required policy and stage only approved paths, but those are proposed changes, not patches we applied upstream.
Keep action evidence and a recoverable source revision when pausing a loop. Do not assume disabling a schedule cancels existing jobs or undoes published changes. This review made no instruction-file edits, credential changes, CI deployment or security-audit claim.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Protect approved constraints during instruction cleanup.
- 2
Separate the maintainer request from untrusted context.
- 3
Review branch execution before exposing credentials.
- 4
Make missing memory and out-of-scope changes fail visibly.
Copy-ready example
{
"proposedPolicy": true,
"requiredMemoryMustLoad": true,
"stageOnlyApprovedPaths": true,
"reviewBranchBeforeSecrets": true,
"rawCommentsAreEvidence": true,
"upstreamPatched": false
}Frequently asked questions
Are Markdown memory changes operationally harmless?
No. They can influence future agent actions and need review.
Does a matching marker make executing the PR branch safe?
No. Branch contents and credential exposure require separate assessment.
Sources
- HumanLayer Skills / plugins/improve-claude-md/skills/improve-claude-md/SKILL.mdSource checked 2026-09-14
- HumanLayer Skills / plugins/design-control-loop/skills/design-control-loop/references/agent-iteration.tsSource checked 2026-09-14
- HumanLayer Skills / plugins/design-control-loop/skills/design-control-loop/references/workflow-template.ymlSource checked 2026-09-14