MCPInstall
muratcankoylan avatar

instruction-surface-security

Hardens agent runtimes against persistent prompt injection or unauthorized changes to instructions and permissions. Use to audit what agents auto-load, design reviewed activation for project rules, skills, memory, or tool configuration, and test whether trust boundaries hold after reload, restart, or delegation.

Installs
0
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/muratcankoylan/agent-skills-for-context-engineering --skill instruction-surface-security
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads instruction-surface-security automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Instruction-Surface Security

A memory entry, configuration edit, or handoff can change what the next agent treats as authoritative. Protect the transition from mutable content to effective instructions or capabilities. Treat text warnings as defense in depth and put enforceable decisions in the runtime.

When to Activate

  • Audit how a coding, research, or multi-agent runtime discovers instructions, memory, skills, tools, or permission policy.
  • Design an approval boundary for changes that affect later turns, sessions, workers, or deployment.
  • Investigate unexpected instruction drift or check whether a recovery restored the effective runtime state.
  • Evaluate containment and legitimate task completion across a reload, restart, or handoff.

Do not activate for general tool design, routine edits with no instruction or privilege boundary, or generic application security. Use context-degradation for accidental drift and self-managed-context for bounded edits to the model's live context. Use harness-engineering for general optimizer and evaluator governance.

Core Concepts

  • Effective surface. The inputs the selected runtime actually uses to set instructions, tools, executable behavior, or permissions. Include each source's role, scope, precedence, resolvers or imports, writers, and activation triggers. The same file can be data in one runtime and loaded guidance in another.
  • Write and activation. A write changes stored state. Activation changes what an agent consumes or can do. Enforce both boundaries. A repository review gates merge and may leave working-copy activation entirely exposed.
  • Integrity and authorization. A digest identifies content and a verified signature identifies a signer. An independent policy must authorize that principal, revision, target, and effect. A handoff, memory entry, or review note carries evidence and proposals. Any authority it conveys must come from the authenticated delegation envelope and the recipient's own runtime policy.
  • Scope of the evidence. The Mind Viruses preprint observes persistent instructions and onward transfer in its test harnesses. The prompt warning reduced spread in a bounded experiment, with residual first-hop behavior. Read the research evidence when interpreting the paper or comparing interventions.

Practical Guidance

  1. Map one concrete runtime. Pin build, profile, workspace root, and effective agent role. Trace loaders from startup through resume, directory changes, tool discovery, and delegation where supported. For each authority-bearing input, record who can produce or replace it, what consumes it, when it takes effect, and what blocks an unauthorized change. Mark unknown entries. Use loader diagnostics or inspect the installed implementation from a trusted inspection environment.
  2. Stage proposals as data. Keep ordinary task outputs and proposals writable. Keep staged changes out of authority-bearing load paths. Workers can still retrieve source-labeled notes or staged proposals through a data-only index. Review candidate text as quoted data. Use a separate restricted preview only when needed. Time in staging grants no authority.
  3. Approve the effective change. Compare the candidate with the last approved configuration, including differences in scope, capabilities, and imported dependencies. Bind approval to the exact artifact or resolved snapshot, target profile and scope, active base and policy revision, and authorized approver. Use approvals or signatures verified outside the candidate and outside the agent's writable state.
  4. Mediate activation. Use the runtime, launcher, or an external policy boundary to activate precisely the reviewed inputs. Verify at first use and at each supported change of effective inputs. Keep the files or immutable snapshot used at activation consistent with what was verified. Reject stale or unbound changes. Where the host cannot enforce this, constrain the runtime to an approved input set or report the remaining exposure explicitly.
  5. Verify from outside the model. Observe what loaded and which capabilities were available, then exercise a bounded behavioral check and an authorized task. A statement of compliance is diagnostic. For an unexpected change, pause affected launches or sensitive actions, preserve relevant evidence, and restore known-good inputs and settings through a trusted path. Verify from a clean session with affected caches and resumed state accounted for.

For an audit, deliver the effective surface map, evidence links, and unresolved paths. For a design, identify the enforcing component, its approval contract, and a recovery path. Use the runtime review and promotion reference for an inventory and approval record or a prompt to use alongside actual controls. Use the evaluation protocol for defensive experiments.

Examples

A formatting preference proposed by a research worker can be kept as a data record and evaluated on a sample document. The parent can continue compiling the report under its existing instructions. Before making the preference a workspace default, a policy-authorized reviewer approves the exact revision and scope, and the next clean session records the revision it loaded.

A project checks approvals before merging rule changes. Its interactive runtime also reads working-copy rules. Record separate boundaries for publishing and local activation, then verify the latter at load time. A successful merge check establishes only the publishing result.

Guidelines

  • Preserve legitimate work under the last approved state when a change is staged or blocked. Return the affected surface, decision, evidence, and next permitted operation.
  • Match controls to effects. Protect anything that grants authority or automatically steers future agents. Keep regular scratch memory and task artifacts available as data where their loader and permissions support that distinction.
  • Audit delegated work using the recipient's effective permissions. Carry source and scope across the handoff, and require independent authorization for sensitive effects.

Gotchas

  1. Filename lists miss effective inputs. Nested rules, resolved imports, plugin state, dynamic tool registration, and resumed context can change what is in force. Observe the actual loader.
  2. Post-start checks arrive late. A diff or canary can detect a change after admission. Gate the load or capability use before it takes effect.
  3. Approval can outlive its review. Replacing a path or changing an import, scope, or policy can invalidate approval even when the primary file's bytes match.
  4. A refusal can hide a failure. The model may report that it refused while a different writer already changed state. Check trusted lifecycle events and state, including recovery and ordinary task completion.

Integration

Use harness-engineering to protect the controller and logs, multi-agent-patterns for delegation topology and role allocation, and evaluation for deterministic graders and regression coverage. This skill owns the boundary between proposed content and authority during load or use.

References

  • Runtime review and promotion
  • Defensive evaluation protocol
  • Research evidence and limits

FAQ

What does the instruction-surface-security skill do?

Hardens agent runtimes against persistent prompt injection or unauthorized changes to instructions and permissions. Use to audit what agents auto-load, design reviewed activation for project rules, skills, memory, or tool configuration, and test whether trust boundaries hold after reload, restart, or delegation.

How do I install instruction-surface-security?

Run npx skills add https://github.com/muratcankoylan/agent-skills-for-context-engineering --skill instruction-surface-security in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/instruction-surface-security/ (personal) or .claude/skills/instruction-surface-security/ (project).

Which AI agents can use instruction-surface-security?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is instruction-surface-security safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains instruction-surface-security?

It is published by muratcankoylan in muratcankoylan/agent-skills-for-context-engineering. It has 0 recorded installs.

More from muratcankoylan/agent-skills-for-context-engineering

View all →
muratcankoylan avatar

context-engineering-collection

muratcankoylan/agent-skills-for-context-engineering

Open the skill to read its SKILL.md instructions.

AI & Agents4.5K installs
muratcankoylan avatar

context-compression

muratcankoylan/agent-skills-for-context-engineering

This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve decisions, files, risks, and next actions.

AI & Agents723 installs
muratcankoylan avatar

context-optimization

muratcankoylan/agent-skills-for-context-engineering

This skill should be used for improving context efficiency: context budgeting, observation masking, prefix or KV-cache strategy, partitioning, token-cost reduction, retrieval scoping, and extending effective context capacity without lowering answer quality.

AI & Agents577 installs
muratcankoylan avatar

filesystem-context

muratcankoylan/agent-skills-for-context-engineering

This skill should be used when agent work needs file-backed context: durable scratchpads, tool-output offloading, just-in-time discovery, cross-agent handoff files, filesystem memory, or cleanup policies for context stored outside the prompt.

AI & Agents434 installs
muratcankoylan avatar

multi-agent-patterns

muratcankoylan/agent-skills-for-context-engineering

This skill should be used when designing multi-agent systems that need context isolation, supervisor or swarm coordination, explicit handoffs, parallel execution, or a decision on whether multiple agents are justified.

AI & Agents379 installs
muratcankoylan avatar

memory-systems

muratcankoylan/agent-skills-for-context-engineering

This skill should be used for persistent semantic memory in agent systems: cross-session knowledge retention, entity tracking, temporal validity, graph or vector retrieval, memory consolidation, and memory benchmark selection. Route file-backed scratchpads to filesystem-context, handoff summaries to context-compression, and token-efficiency tactics to context-optimization.

AI & Agents376 installs

Popular security skills

View category →
microsoft avatar

azure-compliance

microsoft/azure-skills

Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

OfficialSecurity767.2K installs
lllllllama avatar

minimal-run-and-audit

lllllllama/rigorpilot-skills

Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.

Security504.6K installs
coreyhaines31 avatar

seo-audit

coreyhaines31/marketingskills

When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.

Security264.7K installs
firebase avatar

firebase-security-rules-auditor

firebase/agent-skills

Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.

OfficialSecurity153.1K installs
cloudflare avatar

security-audit

cloudflare/security-audit-skill

Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

Security124.5K installs
coreyhaines31 avatar

competitors

coreyhaines31/marketingskills

When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.

Security94.9K installs