hier_config: Skill for Claude Code

.claude/skills/hier-config-troubleshoot/SKILL.md

hier-config-troubleshoot is a skill for Claude Code from netdevops/hier_config. It costs 53 tokens per session (1,259 once invoked), scanned A, original, MIT.

A troubleshooting guide for `hier_config`, a Python library that compares network-device configurations and creates commands to bring one configuration in line with another.

In plain words
What is it for?
Use it to investigate wrong remediation commands, missing or repeated lines, incorrect nesting, duplicate-child errors, and rollback or future-configuration problems.
Why use it?
It provides a repeatable way to reduce unexpected output to a small example and locate whether parsing, vendor rules, or comparison logic caused it.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is netdevops/hier_config's own configuration. It tells Claude Code how to work on hier_config itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything hier_config configures →

Reuse

Borrowing it

Nothing to install: this file belongs to netdevops/hier_config. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/netdevops/hier_config/master/.claude/skills/hier-config-troubleshoot/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/netdevops/hier_config

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hier-config-troubleshoot

README.md
[![agentmods](https://agentmods.dev/badge/skills/netdevops/hier_config/hier-config-troubleshoot.svg)](https://agentmods.dev/skills/netdevops/hier_config/hier-config-troubleshoot)
Your own site
<a href="https://agentmods.dev/skills/netdevops/hier_config/hier-config-troubleshoot"><img src="https://agentmods.dev/badge/skills/netdevops/hier_config/hier-config-troubleshoot.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,259 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.01259
Opus 5 $0.00026 $0.00629
Sonnet 5 $0.00011 $0.00252
Haiku 4.5 $0.00005 $0.00126

Measured 7d ago against content hash 8dfe80f7c0d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

hier-config-troubleshoot scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/hier-config-troubleshoot/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Troubleshoot hier_config Behavior

Diagnose why hier_config produced unexpected output. Work from a minimal reproduction, identify which layer is responsible (parsing → driver rules → diff algorithm), then fix at the source with a regression test.

Step 1: Reproduce Minimally

Reduce the problem to the smallest config pair that shows it, using inline tuples — no fixture files needed:

from hier_config import Platform, get_hconfig_fast_load

running_config = get_hconfig_fast_load(Platform.CISCO_IOS, ("hostname foo",))
generated_config = get_hconfig_fast_load(Platform.CISCO_IOS, ("hostname bar",))
print("\n".join(running_config.config_to_get_to(generated_config).dump_simple()))

Bisect: delete config lines until removing one more makes the symptom disappear. That line (and its ancestry) is where to look. If the report compares platforms ("works on X, broken on Y"), reproduce both platforms — claimed-working references are often wrong, and the platforms that actually differ tell you which rule is responsible. If the raw config parses differently than expected, compare get_hconfig() (full parse with preprocessing) against get_hconfig_fast_load() (no preprocessing) — a difference means a per_line_sub/full_text_sub/config_preprocessor or indentation issue.

Step 2: Inspect the Tree, Not the Text

  • config.dump_simple() — the parsed tree as indented lines; wrong nesting is visible immediately.
  • running_config.unified_diff(generated_config) — structure-aware diff.
  • config.driver.rules — the live rule set; check what the platform driver actually matches.

Step 3: Match Symptom to Layer

Symptom Likely cause Where to look
Command emitted as no X + Y instead of just Y Missing idempotency rule — the command is last-write-wins on the device but the driver doesn't know idempotent_commands in the platform driver; add IdempotentCommandsRule
Negation has the wrong form (no shutdown vs default shutdown vs truncated args) Negation rules negate_with (NegationDefaultWithRule), negation_default_when, or the driver's swap_negation override
Lines nested under the wrong parent; everything after line X collapses under it Irregular indentation in vendor output; an IndentAdjustRule matching too broadly or missing indent_adjust rules. Real cases: XR template blocks; Huawei peer-public-key end (see git log for #205, #268)
DuplicateChildError Platform legitimately repeats a child text under one parent Add ParentAllowsDuplicateChildRule (see #266 for a real example)
Section replaced wholesale (or should be, but isn't) Sectional overwrite sectional_overwrite / sectional_overwrite_no_negate (XR route-policy is the canonical case)
Missing/wrong exit token after a section (exit, quit, end-policy) Sectional exiting sectional_exiting rules; exit_text_parent_level for unindented exits
Commands in an order the device rejects Ordering weights ordering rules (lower weight applies first)
Junk lines in the tree (banners, comments, timestamps) Load-time substitutions per_line_sub / full_text_sub
future() or rollback doesn't match real device behavior Known algorithm limitations docs/user/future-config.md#known-limitations — duplicate children and order-dependent sections (ACLs need sequence numbers) are documented limits
Wrong platform behavior entirely Wrong driver selected Confirm the Platform enum member; GENERIC has almost no rules

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 70 lines · 53 tokens per session scan A 8dfe80f7c0d6

Subscribe to this mod's changes

hier-config-troubleshoot is a skill published in the GitHub repository netdevops/hier_config (149 stars, last pushed 11d ago), licensed MIT. It adds 53 tokens to every session and 1,259 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

Other skills, from other repositories

printing-press-amend

Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…

mvanhorn/cli-printing-press · 222 tokens

convex-performance-audit

Audits Convex performance for reads, subscriptions, write contention, and function limits. Use for slow features, insights findings, OCC conflicts, or read amplification.

openclaw/clawhub · 38 tokens

convex-insights

Query a running Convex app's logs + health in natural language (official MCP): failures, slow/expensive functions, deploy causality — scoped, evidence-backed, with a dashboard deep link.

openclaw/clawhub · 45 tokens

ssl-proxy-troubleshoot

Systematic workflow for troubleshooting SSL/proxy connectivity issues with government websites.

HKUDS/OpenSpace · 20 tokens

diagnose-backend-bug

Diagnose a bounded backend or multi-service failure from GitHub Issues, Jira, Aone, user-provided exports, logs, traces, responses, stack traces, or job records. Use when a service, API, RPC, worker, queue, CLI, or scheduled job bug needs correlation through the project's existing observability route before repair; do…

QoderAI/better-harness · 87 tokens

axiom-networking

Use when implementing or debugging ANY network connection, API call, or socket. Covers URLSession, Network.framework, NetworkConnection, connection diagnostics.

CharlesWiltgen/Axiom · 33 tokens