Apply to my task
arXiv:2610.18927 ★ 83 Oct 13, 2026

Auditing Agent Skills for Contradictions: Fix What the Agent Will Actually Run, and That Depends on the Model

Key result

Contradictions turned up in two thirds of skills (a skill is a folder of instructions, scripts and configs for an agent). But their count says almost nothing about real damage. The method lets you check a skill before running it and find only the contradictions that will break the result. Look for discrepancies across three boundaries (environment and skill, document and document, document and code), then keep only the ones that sit on the execution path. The agent reads the skill in nearly 100% of runs, but its reaction to the bug depends on the model. The fix helped Claude Haiku 4.5 a lot and barely affected DeepSeek-V4-Flash.

01

TL;DR

Researchers looked at what happens when the files inside an agent skill (a folder with SKILL.md, scripts and configs) contradict each other. Say the docs promise sorting and the script doesn't sort. Or one file pins library version 6 while another says 7.9. They found contradictions like these in two thirds of skills, picked 49 real cases and ran agents in three modes: no skill, the skill as is, and the skill with the contradiction minimally fixed.

The headline finding: the number of contradictions you find says almost nothing about the actual damage. The agent reads the skill in nearly 100% of runs, so it always runs into the bug. What differs is what it does next. A weak model takes the broken instruction and dutifully follows it all the way to a broken result. A strong one notices the mismatch and works around it or fixes it on the fly. As a result, fixing the skill helped one model a lot (Claude Haiku 4.5) and barely moved the needle for another (DeepSeek-V4-Flash).

The method boils down to this: audit the skill across three "boundaries". The first is environment vs. skill, the second is document vs. document, the third is document vs. code. Then make a minimal fix to just the conflicting spot. Defects that sit on the execution path get priority. The weaker the model, the more skill hygiene matters.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

STEP 1: Read the whole skill (SKILL.md + scripts + configs) → a map: what's in it and what references what
STEP 2: Hunt for contradictions across three boundaries → list of findings
        • Environment ↔ skill (versions, dependencies, paths, permissions)
        • Document ↔ document (two parts of the description say different things)
        • Document ↔ code (one thing promised, another delivered)
STEP 3: Drop the trivia (code does more than documented — usually harmless) → confirmed findings
STEP 4: Rank by reachability: will this spot be hit in a normal run? → priority
STEP 5: Minimally fix one spot (don't rewrite the skill) → "fixed" skill
STEP 6: Compare task results: no skill / original / fixed → decide whether the fix was worth it

Steps 1–4 fit into a single chat or a single agent session. Step 6 takes several runs.

03

Example in Action

Task: You run a small online store selling on Amazon and Etsy. You grabbed a Claude Code skill from a public repo: "weekly revenue report from marketplace exports". On it, a cheap model keeps producing reports with the weeks in the wrong order and choking on the pandas install. Before blaming the model, you check the skill itself.

Prompt:

You are an auditor of agent skills. Below is the "weekly-revenue-report" skill folder: 
SKILL.md, README.md, scripts/build_report.py, requirements.txt.

Find contradictions across three boundaries:
1. Environment ↔ skill: Python/library versions, paths, permissions, external services.
2. Document ↔ document: SKILL.md, README and comments say different things.
3. Document ↔ code: the docs promise something the code doesn't do 
   (over-promised), or the code does the opposite of what's written.
   If the code does more than documented — skip it, that's harmless.

For each finding: type, a quote from each file with line numbers, 
why it's a conflict, will this spot be hit in a normal run 
(yes / no / not sure), how to fix it minimally.
At the end — top 3 findings by likelihood of breaking the result.

[paste file contents]

Result: The model returns a structured list of findings. Each one gets a type (environment, doc-doc, doc-code), two quotes side by side, a "will it be hit in a run" call and a minimal-fix option. At the end comes a short prioritized top 3. Expect version conflicts there, plus spots where the text promises sorting or validation and the script has none. You'll have to toss some findings by hand as false positives.

04

Why It Works

The weakness: An agent reads a skill as an instruction, not as an argument. If the text says "sort by date", a weak model will do exactly that, even when the script sitting right next to it can't. It doesn't cross-check promises against reality; it just executes the text. So a bug in the skill becomes a bug in the output.

The strength: LLMs are good at spotting discrepancies between two pieces of text if you put them side by side and ask point-blank. Matching a README quote against code is easier for them than catching the bug "live" during execution. That's why an audit before the run beats hoping the agent will sort it out on its own.

How the method exploits this: You move the check from execution time to prep time. The three boundaries give the model a clear frame instead of a vague "find the bugs". The "will it be hit in a run" filter keeps you from drowning in a hundred harmless nitpicks. The paper shows that ranking by reachability matters more than the raw number of findings.

Control levers: - Agent model. Weak or cheap model: fixing the skill is a must. Strong one: you can test without fixes first. - The "harmless" filter. The original drops "code does more than documented". For skills that humans will read later, you can remove this filter. - Fix mode. "Minimal fix" keeps the skill stable. "Rewrite it all" risks introducing new discrepancies. - Check depth. Ask for "not sure" instead of a verdict, and the model won't invent conflicts.

05

Prompt Template

The paper doesn't include ready-made prompt text: the SkillAudit auditor is code with several LLM checks. The template below is built from its description and the paper's taxonomy, so it's a reconstruction.

<Role>
You are an auditor of skills for LLM agents. Your job is to find places where parts 
of a skill contradict each other and assess whether they will break execution.
</Role>

<Input>
Skill: {skill_name}
Files:
{file_contents_with_names_and_line_numbers}
</Input>

<Process>
Step 1. Skill map. List the files, what each one does, and what it references.
Step 2. Search across three boundaries:
  A. Environment: skill ↔ environment ({runtime_environment}). Versions, dependencies, paths, permissions.
  B. Inter-Document: document ↔ document. Different versions, steps, constraints 
     in SKILL.md, README, comments.
  C. Document-Code: document ↔ code. Flag two kinds:
     • Over-promised: the docs promise it, the code doesn't do it
     • Semantically-conflicting: both describe the behavior, but differently
     Under-promised (code does more than documented) — don't include.
Step 3. Verify each finding: make sure both quotes exist and actually 
  conflict. Mark anything doubtful as "not sure"; don't make things up.
Step 4. Reachability: for each finding, say whether this spot will be hit 
  in a normal run of the task "{typical_task}": yes / no / not sure.
</Process>

<Output>
For each finding:
- Type (A / B / C-over / C-conflict)
- Quote 1 (file:line) and quote 2 (file:line)
- Why it's a conflict
- Reachability: yes / no / not sure
- Minimal fix: what to change in ONE place. Don't rewrite anything else.
At the end: top 3 findings by likelihood of breaking the result.
</Output>

What to fill in: - {skill_name} — the folder or skill name. - {file_contents_with_names_and_line_numbers} — the file texts. Line numbers let you verify the quotes. - {runtime_environment} — for example, "Python 3.11, Linux, no internet". - {typical_task} — what users usually ask this skill to do.

🚀 Quick start — paste into the chat:

Here's a skill-audit template. Adapt it to my skill: [describe what the skill does and what environment it runs in].
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask about the runtime environment, the typical task and which files are included. You can't judge reachability without knowing what will actually run. It will take the structure from the template (three boundaries, the "harmless" filter, reachability, minimal fix) and assemble a ready prompt for your skill.

06

Limitations

⚠️ Experiment scale: The impact of fixes was measured on 49 tasks and three small models, with one target defect per task. Real skills contain many defects at once, and how they interact wasn't studied.

⚠️ No flagships: They tested Claude Haiku 4.5, Qwen3.6-35B (4-bit quantized) and DeepSeek-V4-Flash with reasoning off. On the strongest models the picture may be even milder, but the paper didn't show that. The authors ask for caution with head-to-head comparisons between models.

⚠️ The effect isn't uniform: For one model the fix gave a noticeable boost, for another almost nothing. There's no universal "fix the skill, get X% better".

⚠️ The audit itself is done by an LLM: Automated contradiction search produced false positives, so the authors confirmed findings by hand. Eyeball the auditor prompt's output.

⚠️ No ready-made prompt: The paper gives a taxonomy and a pipeline description, but not the prompt text. The template above is a reconstruction. You'll have to test its effectiveness yourself.

⚠️ Text was truncated: The version we received is missing some metrics (token costs, steps). Conclusions about execution efficiency aren't covered here.

07

How They Studied It

The question was simple: if a skill has a contradiction, is that bad? The researchers collected 575 skills: 488 from popular GitHub repos and 87 from the SkillBench test set. First they built a taxonomy of contradictions: environment, doc-doc, doc-code. Then an automated tool flagged candidates, and two authors manually confirmed 1182 real inconsistencies. They show up in 67% of GitHub skills and 64% of SkillBench skills. Even hand-written reference skills are no cleaner. SkillBench has the most "docs promise, code doesn't deliver" cases (45.6% of all findings).

Then came the main experiment. They turned 49 findings into executable tasks in Docker, with results checked by a program, no LLM judge. For each one they built a pair: the original skill and a minimally fixed one. Every task ran in three modes (no skill, original, fixed) on three models, three repeats each. That gave 441 trajectory pairs to analyze.

Here's the surprise. You'd think models gain differently because some read the skill and others don't. But the skill was read in 97% of runs. The difference shows up after contact with the bug. Haiku followed the bug into failure in 30% of runs, Qwen in 24%, DeepSeek in 12%. And DeepSeek recovered in 56% of cases where it noticed the bug. The practical takeaway: counting defects in a skill is pointless. Look at which model the skill runs on and whether the defect sits on the real execution path.

08

Original from the Paper

Contradiction taxonomy (layer definitions verbatim):

We first classify inconsistencies by the participants of the violated contract:
• Environmental layer: Skill vs. runtime environment.
• Inter-document layer: conflicts among descriptive documents.
• Document-code layer: documentation vs. implementation.

Within the Document-code layer, we further classify inconsistencies by the direction of deviation:
• Over-promised (Doc > Code). The documentation promises functionality, constraints, or behavior that the implementation does not provide.
• Semantically-conflicting (Doc ≠ Code). The documentation and implementation both specify the relevant behavior but contradict each other semantically.
• Under-promised (Doc < Code). The implementation provides capabilities that are not documented.

Context: This is the framework the SkillAudit tool used to find issues. The authors dropped under-promised cases by default as harmless.

09

Adaptations and Extrapolations

💡 Adaptation: minimal fix of a contradiction

The paper describes a repair rule: the fix is surgical, and the solution doesn't "leak" the task's answer. In a chat, this becomes a separate prompt for a second pass:

Here's a finding from the audit: {finding}.
Decide which of the two fragments is authoritative (go by what 
actually works in {runtime_environment}). Fix ONLY this spot: 
align the description or the code. If the promise can't be kept in our environment, 
narrow the documentation instead of writing new code. Don't change anything else.
Show the diff.

🔧 Technique: add a "stop rule" to the instructions file → less blind following (extrapolation, not tested in the paper)

The paper showed that weak models blindly follow a broken instruction. It makes sense to try adding this to CLAUDE.md or AGENTS.md:

If the skill's instructions disagree with the actual behavior of the scripts, errors or 
command output — don't keep following the instructions. 
Name the discrepancy in one line and choose the option that is confirmed 
by real output.

This is a hypothesis inspired by the finding that "strong models notice and work around bugs on their own". Test how well this phrase works on your own tasks.

10

Resources

  • Paper title: Why Static Skill Inconsistencies Do Not Equate to Runtime Risks: A Behavioral Analysis of LLM Agent Execution
  • Authors: Fengrui Fan, Huahao Wang, Jingyi Fang, Yutao Hu, Yueming Wu, Deqing Zou
  • Affiliation: Huazhong University of Science and Technology, China
  • Mentioned in the paper: SkillBench (a skill set with reference tasks), SkillAudit (a static audit tool), WildSkills (a set of 49 verifiable tasks)
  • Models tested: Claude Haiku 4.5, Qwen3.6-35B-A3B, DeepSeek-V4-Flash

Research digest

Key result

Contradictions turned up in two thirds of skills (a skill is a folder of instructions, scripts and configs for an agent). But their count says almost nothing about real damage. The method lets you check a skill before running it and find only the contradictions that will break the result. Look for discrepancies across three boundaries (environment and skill, document and document, document and code), then keep only the ones that sit on the execution path. The agent reads the skill in nearly 100% of runs, but its reaction to the bug depends on the model. The fix helped Claude Haiku 4.5 a lot and barely affected DeepSeek-V4-Flash.

Principle

It works as a check across three seams. 1. Environment and skill: library versions, paths, permissions. One place says version 6, another says 7.9. 2. Document and document: SKILL.md and README say different things. 3. Document and code: the text promises sorting, the script doesn't sort. Next comes a filter. If the code does more than documented, that's usually harmless, so skip it. For the rest, ask: will this spot be hit in a normal run? Fix one spot with a minimal edit instead of rewriting the whole skill. A weak model executes text like an order. A strong one notices the mismatch and works around it. So the cheaper the model, the more skill hygiene matters.

Why it works

A weak model reads a skill as an instruction, not as an argument between two documents. It says "sort by date", so it sorts, even if the script can't. A bug in the text turns into a bug in the result. LLMs have a strength too. They're good at spotting discrepancies if you put two fragments side by side and ask point-blank. Matching a README quote against code is easier than catching a bug on the fly during execution. The method moves the check from execution time to prep time, where LLMs do noticeably better. The three boundaries give a clear frame instead of a vague "find the bugs". The "will it be hit in a run" filter protects you from a hundred harmless nitpicks. To be upfront about scale: they tested 49 tasks and three small models, one defect per task. How defects behave together is unknown.

When to apply

Agent skills (Claude Code and similar) → downloaded from public repos or written by your team, especially when a cheap model produces wonky output and it's unclear whether the model or the skill is to blame. Works well before a large-scale rollout on a weak model. The cheaper the model, the bigger the payoff. NOT a fit if you have a strong model and the skill rarely changes: test it without fixes first, the effect may be close to zero. Also, don't trust the list of findings blindly; some will be false positives.

Mini recipe

1. Gather the whole skill: SKILL.md, README, scripts, configs. With line numbers, so quotes can be verified. 2. Describe the environment and task: for example, "Python 3.11, Linux, no internet" and what people usually ask the skill to do. Without this you can't judge reachability. 3. Run the audit across three boundaries: environment and skill, document and document, document and code. Skip "code does more than documented". 4. Allow doubt: ask for a "yes / no / not sure" answer on whether a spot gets hit in a run. That way the model doesn't invent conflicts. 5. Eyeball the top 3: some findings will be false. Toss them by hand. 6. Fix one spot per finding: minimally, without rewriting the rest. 7. Compare three runs: no skill, original, fixed. That shows whether the fix was worth it for your particular model. Auditor role: auditor of skills for LLM agents

Examples

[BAD]: `Check my skill and find the bugs` [GOOD]: `You are a skill auditor. Below are the files of the weekly-revenue-report skill: SKILL.md, README.md, scripts/build_report.py, requirements.txt. Find contradictions across three boundaries: environment and skill, document and document, document and code. If the code does more than documented, skip it. For each finding give the type, two quotes with line numbers, why it's a conflict, whether the spot is hit in a normal run (yes / no / not sure) and a minimal fix. At the end, the top 3 by likelihood of breaking the report.` [BAD]: `Rewrite the whole skill so it has no bugs` [GOOD]: `SKILL.md says "sort weeks by date", but build_report.py has no sorting. Suggest a fix in ONE place: either add sorting to the script or remove the promise from the text. Leave everything else alone.`

In plain words

AI agents can't think critically — they take text as gospel. When you plug a ready-made skill into a model, it doesn't audit the code; it just mindlessly follows the manual. Researchers popped the hood and found something scary: 2 out of 3 off-the-shelf skills have a split personality. The description file promises one thing, the script right next to it does something else entirely, turning the agent into a blind executor of other people's bugs.

It's like assembling an IKEA wardrobe using the manual for a washing machine. The booklet says "insert the M8 bolt", the box only has nails, but the worker keeps trying to screw in a nail, because hey, that's what the manual says. The model has no doubts: told to sort by date, it will pretend to sort, even if the script has never seen a date in its life.

The authors took 49 real conflicts and ran agents through three scenarios: no skill, the skill as is, and a minimally fixed config. The results exposed the root of the trouble: the agent breaks not because it's dumb, but because of static inconsistencies. When the docs say library version 6 and the code calls version 7.9, the model freezes up and faceplants for no reason.

The experiment used basic scripts, but the same rake is waiting across the whole stack: from tools in Claude Code to agents crunching marketplace exports. If you feed an LLM an external tool, the model will always pick the documentation's text over common sense. A docs-vs-code conflict is guaranteed to kill your pipeline, even if you run the priciest model on the market.

Stop blaming the model for "getting dumber again" — first clean the junk out of the skill's own files. A minimal sync between code and text fixes agent behavior faster than endless prompt tweaking. Either you clear out the contradictions by hand, or the agent keeps confidently wrecking your tasks on your own dime.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on Auditing Agent Skills for Contradictions: Fix What the Agent Will Actually Run, and That Depends on the Model arXiv:2610.18927

Sign in to apply this study New accounts get 50 free credits.