The Ad Hoc AI Coding Agent Skills
Guidebook

This guidebook is for government agencies adopting AI coding tools and looking to get real value from skills, instruction files, and custom agents.

Follow these nine practices to move from unorganized experimentation to deliberate, governed, and measurable use of AI coding tools.

Special thanks to Mark Headd for writing this guidebook. October 2026.

Introduction

AI coding assistants are changing how government agencies build software. Tools like GitHub Copilot, Claude Code, Cursor, and others can generate code, explain complex systems, and speed up development workflows. Adoption is growing quickly, and in many agencies it’s already happening whether leadership has officially sanctioned it or not.

These tools become significantly more useful when experts on your agency’s business processes and goals give them context about how things work. That context comes in the form of skills, instruction files, and similar artifacts: text files that tell the AI tool about your coding standards, architecture patterns, security requirements, and domain knowledge. They go by different names depending on the tool: skills, instruction files, AGENTS.md, CLAUDE.md, custom instructions, and so on. The concept is the same. They provide structured guidance that shapes how the AI tool generates code.

A note on terms

Because each tool uses its own vocabulary, this guidebook uses skills (or, interchangeably, agent instruction files) as the umbrella term for all of these artifacts. Where the difference matters, we’re more specific.

  • Always-on instruction files are loaded into every session. Examples include AGENTS.md, CLAUDE.md, and GitHub Copilot’s custom instruction files.
  • On-demand skills are packaged instructions, sometimes with bundled scripts or reference files, that the agent loads only when it decides they’re relevant. Agent skills defined in a SKILL.md file are one example.
  • Custom agents are specialized agent configurations, often with their own instructions and tool permissions, built to handle particular kinds of tasks.

The barrier to creating these files is low. Anyone can write one in minutes or download one from the many public repositories. That accessibility is both an opportunity and a challenge. Without intentional practices, agencies end up with inconsistent guidance scattered across teams, no visibility into what’s being used, and no way to know if any of it is actually helping.

The real benefit of skills comes when they are adopted as part of a systematic approach to delivering software. A systematic approach can scale your teams’ expertise and capabilities and compound the benefits of other foundational parts of the software development life cycle, so you deliver faster and with more impact.

This guidebook offers government technology leaders a path forward. It’s for agencies that want to move beyond unorganized experimentation with AI coding tools toward deliberate, governed, and measurable use. It outlines practices that deliver real value from these tools while keeping the consistency and transparency that government work requires, and it gives agency staff the structure and clarity to use AI coding tools with greater confidence.

Lessons from cloud adoption

The move from individual, unorganized use of AI coding tools to a governed, systemic approach follows a path many organizations already traveled with cloud computing.

Cloud computing changed how organizations built, deployed, and managed digital solutions starting in the mid to late 2000s. Most organizations began in a way similar to how AI coding tools are first adopted. Individuals with access to management consoles from platforms like Amazon Web Services and other providers set up and deployed new cloud resources in bespoke ways. Access to these tools and knowledge of how to use them was unevenly distributed, with little automation, reuse, or guardrails.

Eventually, tools and approaches like infrastructure as code (IaC) helped organizations mature their use of cloud computing. They let organizations share knowledge about best practices across teams, enforce standardization in how cloud resources were configured and deployed, ensure security requirements were met, and speed up delivery. The same trend is happening now with AI coding tools, and the same benefits are available: shared best practices, more standardization and adherence to organizational standards, and faster delivery.

The rest of this guidebook lays out nine practices your organization can use to mature its use of AI tools and move from individual, bespoke habits to a systematic approach.

The Practices

Practice 1

Capture knowledge, don't just create files

The real value is organizational knowledge, not any particular file format or delivery mechanism.

AI coding assistants are shaped by the instructions they receive. On-demand skills, always-on instruction files like AGENTS.md and CLAUDE.md, and custom agents are all ways of delivering guidance to an AI assistant. The specific format matters less than what’s inside these files: your organization’s knowledge about how to write good code.

That knowledge (your coding standards, architecture decisions, security practices, domain expertise) becomes a durable asset when you capture it clearly. You can adapt that asset to whatever delivery mechanism works best today and change course when something better comes along.

Building in flexibility is a smart investment because AI coding assistance is changing fast. New models, new tools, and new approaches arrive regularly. Research findings from six months ago may not apply to current models. A delivery mechanism that works well today may be replaced. That is no reason to wait, because the tools are useful now. It is a reason to build with change in mind and to avoid deep dependencies on any single tool’s syntax or conventions.

When you separate the knowledge (what you want to convey) from the delivery mechanism (how you convey it), you can adapt more easily. A well-documented coding standard can become an on-demand skill, a section of an always-on instruction file, or whatever comes next, without starting from scratch.

The process of writing this guidance is valuable in itself. You’ll surface disagreements, clarify ambiguities, and build shared understanding across your team. The final artifact is a byproduct of the real value: organizational clarity.

Checklist

0 of 7 checked

Key questions

  • What do senior developers know that junior developers don't? Is it written down?
  • If a key team member left tomorrow, what knowledge would leave with them?
  • If our current tool disappeared tomorrow, how much of our work would transfer?
  • Are we investing in the knowledge itself, or just in a particular tool or format?
  • How do we stay informed about changes in AI coding assistance?
Practice 2

Start with real problems

The best skills emerge from observed needs, not anticipated ones.

Don’t start skill development by brainstorming what might be useful. Start by observing what’s actually happening. Where do code reviews repeatedly flag the same issues? Where does AI-generated code consistently miss the mark? What do new team members struggle with?

These patterns point to real opportunities. A skill that addresses a problem you’ve observed multiple times is almost certainly worth the investment. A skill that addresses a hypothetical future problem may never be used.

This is also why your first skills should be your own. It’s tempting to import skills from open source repositories or vendor collections. There are a lot available on the internet, and the number grows daily. They look polished, they’re readily available, and they seem to solve problems you have. But importing without understanding creates risk. The skill may not fit your context, and it may not be safe (see Practice 6). Coding standards, delivery processes, architecture patterns, and security requirements vary widely. You also skip the learning that comes from articulating what you actually want. Write skills based on corrections you repeatedly make, patterns you want to reinforce, and mistakes you want to prevent. This grounds your skills in real needs and builds organizational understanding.

Start small. Pick one or two clear pain points and develop skills to address them. Validate that they help before expanding. Premature abstraction, which means trying to solve problems you don’t have yet, leads to skills that are complex, hard to maintain, and often unused.

Skill development doesn’t happen unless you make space for it. Consider adding a recurring skill development session to your agile cycle: perhaps 30 to 60 minutes per sprint where the team reviews recent pain points and drafts or refines skills. Some teams combine this with retrospectives; others keep it separate. The key is regularity. Small, consistent investments compound over time, and tying the work to observed problems keeps it grounded in real value.

Checklist

0 of 6 checked

Key questions

  • What feedback do reviewers give most often? Is any of that captured in a skill?
  • Where does AI-generated code most frequently miss expectations?
  • Are we solving problems we actually have or problems we think we might have?
  • When was the last time we created or updated a skill? What's preventing it from happening more regularly?
Practice 3

Include diverse perspectives

Engineers alone don't have all the knowledge. Policy experts, end users, and subject matter experts make skills better.

Effective skills encode more than coding standards. They capture domain knowledge, policy requirements, accessibility standards, and organizational context. Much of this knowledge lives with people who aren’t software developers.

Policy experts understand compliance requirements that must be reflected in code. Subject matter experts know domain terminology and business rules. End users understand the problems the software is meant to solve. Documentation specialists know how to communicate clearly. Security staff understand the threats your systems face and the controls your authorization depends on.

Build cross-functional teams for skill development. Create ways for non-engineers to contribute their expertise, even if they can’t write the skill files themselves. Review skills with diverse stakeholders to catch gaps that a purely technical team would miss.

Checklist

0 of 5 checked

Key questions

  • What expertise do non-engineers have that should inform how our AI writes code?
  • How easy is it for a non-developer to contribute to a skill?
  • Are there policy or compliance requirements that aren't captured in any skill?
Practice 4

Keep skills focused

Smaller, composable skills are easier to maintain, test, and combine than monolithic ones.

A skill that tries to cover everything becomes hard to maintain and hard to test. When it’s updated, you can’t be sure what else might break. When it doesn’t work, you can’t isolate why.

Build focused skills that do one thing well. A skill for error handling. A skill for logging conventions. A skill for API design patterns. These can be combined as needed for different projects or contexts.

This modularity also makes it easier to retire or replace individual skills. When your logging approach changes, you update one skill, not every skill that happens to mention logging.

Checklist

0 of 5 checked

Key questions

  • Can we describe what each skill does in one sentence?
  • If a skill fails, can we easily identify what went wrong?
  • Are any of our skills trying to do too much?
Practice 5

Share what's shareable, adapt what you import

Your organization's practices are unique, but many underlying patterns are not.

Once you’ve codified your own practices, look at what’s portable. Not all knowledge is organization-specific, particularly in a government context. Some types of skills are highly portable across agencies and even across governments.

Portable across agencies

  • Technical platform knowledge. How to work with specific languages, frameworks, or legacy systems.
  • Compliance and accessibility patterns. Section 508, security frameworks, plain language requirements. These are common across government.
  • Specification and documentation standards. How to structure outputs, write clearly, and organize information.
  • Public benefit program patterns. Eligibility determination, review and approval flows, and appeals processes. Federal rules define much of this logic, making it shareable even when state-specific variations exist.

Less shareable

  • Organization-specific coding conventions.
  • Business rules and domain logic unique to your agency.
  • Skills tied to your specific architecture or integrations.

When importing external skills, evaluate them critically, for security as well as fit (see Practice 6). Understand why they’re written the way they are. Adapt them to your context rather than using them as-is.

And when you develop skills that encode portable technical knowledge, consider contributing them back. The instruction sets you create today can help other agencies tomorrow.

Checklist

0 of 5 checked

Key questions

  • Which of our skills encode organization-specific practices versus portable technical patterns?
  • Are we aware of shared repositories where we could find, or contribute, relevant skills?
  • If we import a skill, do we understand why it's written the way it is?
Practice 6

Treat skills as part of your software supply chain

Skills shape what an agent does with your code, credentials, and systems. Secure them with the same care you apply to software dependencies.

It’s easy to think of a skill as documentation. After all, it’s just a document. But an agent acts on what a skill says. Skills can bundle scripts for the agent to run, point to external tools and URLs, and direct the agent to read files, execute commands, or call services. The agent typically does this with the developer’s own permissions, on a machine that holds source code and credentials. In practice, a skill behaves less like a document and more like a software dependency.

Public skill marketplaces have already shown some potential consequences. In early 2026, a security audit of one popular skill registry found 341 malicious skills among the 2,857 it examined, many designed to steal credentials. Researchers have also found that marketplace scanning badges offer less assurance than they appear to, and that attackers can hijack skills hosted in abandoned GitHub repositories. Estimates of how widespread the problem is vary considerably by method. Rather than assuming all public skills are malicious, organizations should treat every individual skill as unverified until reviewed.

Plain-text skills aren’t automatically safe either. Malicious instructions don’t require code. A few sentences buried in a long skill can tell an agent to send environment variables to an outside server, weaken a validation check, or quietly add a dependency. This is a form of prompt injection, and it can be hard to spot in a quick review.

Watch what goes in, too

Always-on instruction files are sent to the model with every request, and on-demand skills are sent whenever the agent loads them, often to a vendor-hosted service. Skills also live in repositories that may be shared widely or published under an open-source policy. Keep secrets, credentials, internal hostnames, personally identifiable information, controlled unclassified information (CUI), and detailed security architecture out of them. Confirm that your AI tools are authorized for the data that your skills and code contain, within your system’s authorization boundary and any FedRAMP or equivalent requirements that apply.

Base review on capability

Not every skill needs the same scrutiny. A practical approach is to tier review by what a skill can do.

  1. Guidance only

    Plain-text instructions with no bundled scripts and no external references. Register freely, and let peer review happen through use.
  2. Extend what the agent can do

    Bundled scripts, external URLs, new tool access, or instructions to install software. Requires security review before broad use.
  3. Organization-wide or security-sensitive

    Skills that encode security, compliance, or organization-wide standards require formal review (see Practice 7).

Imported skills get the same tiered review as internal ones, plus a provenance check: where did this come from, and who can change it upstream? Pin imported skills to a specific reviewed version and keep a copy in your own registry rather than pulling them live from a public marketplace each time.

Back instructions with enforcement

Because agents follow instructions probabilistically, security can’t depend on an agent obeying a skill. Run agents with the least access they need to credentials, networks, and production systems. Rely on automated checks in your pipeline (secrets detection, dependency and license scanning, static analysis) to enforce what must hold no matter what the agent generates. Apply those same checks to the instruction files themselves, and flag any change that adds a script or an external reference.

Finally, fold skills into your existing governance rather than building something parallel. Skills belong in your software supply chain practices and your AI policies. For federal agencies, OMB Memorandum M-25-21 already calls for generative AI acceptable-use policies and AI governance boards. Those are natural homes for guidance on skills and instruction files. State and local agencies can apply the same thinking through their own AI and security policies.

Checklist

0 of 8 checked

Key questions

  • If a skill told an agent to send our environment variables to an outside server, would we notice?
  • Do we know where each of our imported skills came from and who can change it upstream?
  • Is there anything in our skills we wouldn't want a model vendor, or the public, to see?
  • Does our AI acceptable-use policy say anything about skills?
Practice 7

Make the right way the easy way

If official processes are more burdensome than unofficial alternatives, people will work around them. Start from trust, and govern through transparency rather than gatekeeping.

Skills are trivially easy to create. Anyone can write one in a few minutes or download one from the internet. If your governance process requires formal submissions, committee approvals, and lengthy documentation, people are likely to work around it. They’ll keep useful skills in personal directories and never share them.

You’ll end up with the worst of both worlds: overhead from maintaining a governance structure that doesn’t actually govern, plus all the risks of ungoverned activity happening in shadow repositories and personal directories.

Design your governance processes so that doing things the official way is genuinely easier than the alternative. Make registration self-service. Make sharing frictionless. Make discovery intuitive. When the sanctioned path is the path of least resistance, adoption follows naturally.

Govern through transparency, not gatekeeping

Rely on visibility and feedback rather than approval gates. Let anyone register a skill in a central registry with minimal friction. Show what others are using. Surface skills that have high adoption or positive feedback. Let peer review happen through use and discussion, not committees.

Reserve formal review for skills with broad scope or high risk: organization-wide standards, security-sensitive guidance, compliance-related requirements. Skills that bundle scripts, reference external resources, or give agents new access warrant security review before broad use (see Practice 6). For guidance-only, team-level experimentation, transparency is usually sufficient.

Checklist

0 of 7 checked

Key questions

  • How long does it take to go from “I wrote a useful skill” to “others can use it”?
  • Do people in our organization use or share skills outside official channels? Why?
  • Can someone discover what skills exist without asking around?
  • Is our review process proportionate to the risk?
  • If we made our governance stricter, would it actually change behavior or just drive activity underground?
Practice 8

Test your assumptions and measure outcomes

Intuitions about what works can be wrong, and activity metrics can hide it. The only way to know is to measure outcomes.

Recent research shows why testing matters.

What Vercel found in early 2026

Software company Vercel compared two ways of giving AI agents access to framework documentation: on-demand skills, where the agent decides when to invoke them, and an always-on instruction file, where the documentation is always available. They expected on-demand skills to work better.

Zero

improvement from on-demand skills at default behavior, compared with no documentation at all

Over half

of test cases where agents failed to invoke an available skill

100%

pass rate on their evaluation suite with a compressed docs index embedded in AGENTS.md

What studies of AGENTS.md files found

What you put into an instruction file can significantly change what an AI coding tool produces, in both directions. One study found that focused instruction files cut completion time, while another study found that unnecessary instructions lowered task success and raised cost.

About 28%

less agent completion time with focused instruction files, with about 17% fewer output tokens

3% lower

task success from unnecessary instructions, with cost up by more than 20%

The key takeaway from research to date is that assumptions can be wrong, and testing is the only way to determine what works in your context. Establish baselines.

Measure outcomes, not activity

It’s easy to count skills created, track invocations, and report adoption numbers. These metrics feel concrete and look good in reports. But they don’t tell you whether skills are improving outcomes.

What matters is whether code quality is improving, developers are more productive, fewer issues make it to production, and the AI’s output requires less rework. These are harder to measure but far more meaningful.

Include qualitative feedback. Ask developers whether skills are helping. Watch for signs of frustration or workarounds. Be willing to report honestly about what isn’t working. That’s how you improve.

Checklist

0 of 10 checked

Key questions

  • How do we know a skill is actually making code better, versus just being invoked?
  • If we have more skills this quarter than last, does that mean we're succeeding?
  • Are we measuring outcomes (code quality, time to completion) or just activity (skills created, invocations)?
  • When was the last time we retired a skill because measurement showed it wasn't working?
Practice 9

Maintain what you create

Skills decay. Without active maintenance, they become stale, misleading, or actively harmful.

Skills are tied to context that changes. Dependencies get updated. Coding standards evolve. Architecture patterns shift. A skill that was accurate a year ago may now encode outdated practices.

Every skill needs an owner: someone responsible for keeping it current. Owners should review skills periodically and update them when circumstances change. Automated checks can help flag skills that haven’t been reviewed or evaluated recently.

When a skill is no longer useful, retire it gracefully. Remove it from active use, but don’t delete it silently. Communicate what changed and what replaces it. Make the transition smooth for people who were relying on it.

Checklist

0 of 5 checked

Key questions

  • How many of our skills were last updated more than six months ago?
  • If a skill's owner left, who would take over?
  • Do people know when a skill they use is deprecated?
Putting it to work

Maturity self-assessment

Know where you are and what comes next.

Progress requires honest assessment. Use this self-assessment to understand your current state and chart a path forward. Understanding where you are helps you prioritize what to do next. An organization just starting out needs different things than one with established practices.

Read through the five levels below and find the highest level where every description fits your organization today. If you’re between two levels, choose the lower one. The descriptions you don’t yet meet show you where to focus. Each level also points to the practices that matter most at that stage.

Level 1: Organic or unorganized

  • Individuals experiment with AI coding assistants.
  • There are no shared skills.
  • There’s no visibility into what others are doing.

Next step: Survey what already exists informally.

Focus practices: 1 – Capture knowledge, 2 – Start with real problems

Level 2: Team adoption

  • Teams develop and share skills informally.
  • There’s some local consistency, but no cross-team coordination.
  • Shadow skills are the norm.

Next step: Create a minimal registry; surface what exists.

Focus practices: 4 – Keep skills focused, 6 – Treat skills as part of your software supply chain, 7 – Make the right way the easy way

Level 3: Organizational awareness

  • Leadership recognizes skill development as a practice area.
  • There are initial efforts to inventory and share.
  • There are emerging standards, but adoption is voluntary.

Next step: Establish lightweight governance; begin measuring.

Focus practices: 3 – Include diverse perspectives, 7 – Make the right way the easy way, 8 – Test and measure

Level 4: Governed and measured

  • A lightweight governance model is in place.
  • A registry exists with good adoption.
  • Metrics are established and tracked.
  • The official path is genuinely easier than unofficial alternatives.

Next step: Focus on continuous improvement; share across teams.

Focus practices: 8 – Test and measure, 9 – Maintain what you create, 5 – Share what’s shareable

Level 5: Strategic capability

  • Skill development is integrated with workforce development.
  • Continuous improvement is based on measured outcomes.
  • Captured knowledge encodes institutional expertise.
  • Delivery mechanisms adapt as the field evolves.
  • There is cross-agency sharing and collaboration.

Next step: Contribute to the broader community; mentor other agencies.

Focus practices: 5 – Share what’s shareable, 1 – Capture knowledge

Checklist

0 of 5 checked

Key questions

  • Are we trying to skip levels? Is that creating problems?
  • What's blocking us from moving to the next level?
  • Do we have the support and resources needed to progress?
Putting it to work

Putting this guidebook into practice

A starting plan, from the first month to ongoing review.

First 30 days

  • Identify a sponsor and small working group.
  • Survey current state: what skills exist informally, and which were imported from outside sources?
  • Select a low-risk pilot area.
  • Establish a minimal registry (can be a shared document to start).
  • Define initial baseline metrics.

30 to 90 days

  • Develop 2-3 skills through a documented process.
  • Test your lightweight review model.
  • Experiment with delivery mechanisms.
  • Gather feedback on friction points.
  • Measure against your baseline.

6 months

  • Expand to additional teams.
  • Refine governance based on what you’ve learned.
  • Invest in discoverability and tooling integration.
  • Establish ongoing measurement practices.
  • Document what’s working and what isn’t.

Ongoing

  • Regular review cycles for effectiveness.
  • Deprecation of underperforming skills.
  • Cross-team sharing and collaboration.
  • Periodic governance assessment: is the right way still the easy way?
  • Adapt delivery mechanisms as the field evolves.
Closing thoughts

Infrastructure as code (IaC) for AI agents

What the infrastructure as code analogy gets right, and where it stops.

This guidebook opened with an analogy to infrastructure as code for framing how to manage and govern agent skill and instruction files. The maturation of cloud computing was accelerated by tools like IaC, and organizations that adopted them reaped (and continue to reap) the benefits.

The analogy helps explain some of the main benefits agent instruction files bring to software teams. Like infrastructure as code, agent instruction files can be managed in a version control system like Git. They can also coexist, and often do, in the same repository as the code they help generate. And like IaC for cloud infrastructure, agent instruction files address the problem of system knowledge living in one team member’s head or scattered across wikis, Google Docs, Git issues, and Slack messages. Besides improving the output of AI coding agents, they are a way to centrally capture team standards, conventions, and practices so they’re visible and auditable.

Infrastructure as code files (like Terraform) and agent instruction files (like SKILL.md) do differ in one important way.

Infrastructure as codeAgent instruction files
BehaviorDeterministicProbabilistic
What happensWhen you run an IaC tool against a Terraform file, you get the same output every time.You can give the same files to different AI tools, or even the same tool in a different context, and potentially get different outputs.

Infrastructure as code codifies an outcome. Agent skills and instruction files codify intent.

That difference is worth keeping in mind. A framework for managing and governing agent instruction files should also include what are called executable invariants: the hooks, checks, and tests that run at commit time or in the CI pipeline and enforce the properties that must hold no matter what an AI coding agent generates. Examples include:

  • Linting and formatting
  • Test coverage thresholds
  • Dependency and license scanning
  • Secrets detection
  • Accessibility checks on anything public-facing

A full discussion of executable invariants is outside the scope of this guidebook, but they are an important complement to the practices described here.

Want to talk about putting these practices to work?

Work with Ad Hoc to learn more about these practices, the executable invariants that reinforce them, and how AI can speed up your software development life cycle.

Talk to the team