structural-edits

structural-edits is a skill for Claude Code, Codex from Zfinix/aster. It costs 49 tokens per session (525 once invoked), scanned A, original, Apache-2.0.

A code-editing tool that finds and rewrites patterns based on a program's structure rather than just matching text. It can apply the same change across many files while avoiding comments and string contents.

In plain words
What is it for?
Perform structural searches, renames, and codemods—automated code transformations—across files using syntax-aware patterns.
Why use it?
It reduces accidental matches when a text search is too broad and avoids repeating the same edit by hand. Narrow patterns also help prevent unrelated code from being changed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Perform structural searches, renames, and codemods—automated code transformations—across files using syntax-aware patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zfinix/aster/structural-edits
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Zfinix/aster --skill structural-edits
Clone the repo
git clone --depth 1 https://github.com/Zfinix/aster

Made for: Claude Code, Codex.

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 structural-edits

README.md
[![agentmods](https://agentmods.dev/badge/skills/zfinix/aster/structural-edits.svg)](https://agentmods.dev/skills/zfinix/aster/structural-edits)
Your own site
<a href="https://agentmods.dev/skills/zfinix/aster/structural-edits"><img src="https://agentmods.dev/badge/skills/zfinix/aster/structural-edits.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 525 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 30
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00049 $0.00525
Opus 5 $0.00024 $0.00262
Sonnet 5 $0.00010 $0.00105
Haiku 4.5 $0.00005 $0.00052

Measured yesterday against content hash 2aecb5676ee4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

structural-edits 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 yesterday.

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.

crates/aster-skills/builtins/internal/structural-edits/SKILL.md · 35 lines

What it actually says

Structural edits

  1. ast_grep over search_files when syntax matters. ast_grep with a pattern like dbg!($X) or fn $NAME($$$ARGS) matches real code, not comments or string literals. Plain text search is fine for identifiers that appear nowhere else. Scope with path to one directory when the change is local.
  2. ast_edit over repeated edit_file when the same change repeats. One pattern plus rewrite applies everywhere at once and returns a diff. Three or more identical edits means ast_edit; one or two means edit_file. Example: pattern dbg!($X) with rewrite eprintln!("{:?}", $X) removes every debug print in the scope in one approval.
  3. Metavariables carry the capture. $X captures a single node, $$$ARGS captures a list. Reuse the same name in the rewrite; a name that appears only in the rewrite is an error, not an insertion.
  4. Patterns must parse as the target language. A pattern that is not valid syntax in the file's language matches nothing, silently. Write the pattern in the language you are editing, and keep it narrow with context ($OBJ.foo($$$ARGS) rather than foo($$$ARGS)) so unrelated calls do not match.
  5. Patterns exclude trailing semicolons. A pattern for dbg!($X) matches the call, not the ; after it. Do not put a semicolon in the pattern or the rewrite unless the statement itself is the target.
  6. Run ast_grep first when unsure. A dry search with the same pattern shows exactly what ast_edit would touch, with no approval needed. If the match list surprises you, fix the pattern before rewriting.
  7. Read the diff at approval time. A too-broad pattern rewrites code you did not intend, and the diff is the only place you will see that. Every changed file goes through the same approval as edit_file; a Deny on one file stops the whole batch.
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. yesterday First seen · 35 lines · 49 tokens per session scan A 2aecb5676ee4

Subscribe to this mod's changes

structural-edits is a skill published in the GitHub repository Zfinix/aster (57 stars, last pushed today), licensed Apache-2.0. It adds 49 tokens to every session and 525 once invoked, about $0.0002 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-06.

Related

Other skills, from other repositories

harness

Use when governing a workspace's control plane, code or not — the 01-TOOLS/ tooling layer, the 02-DOCS/ chaos→knowledge wiki, the root Knowledge map. Audits it, migrates legacy XX- folders, scaffolds provider tooling, sweeps the inbox, writes root CLAUDE.md/AGENTS.md. NOT the bootstrap front door (that is init, which…

ericrisco/rsc-harness · 94 tokens

ctx

Codebase intelligence and evidence-driven governance with the indexed ctx CLI. Use when exploring an unfamiliar repository, locating symbols or callers, checking for existing implementations, estimating change impact, enforcing architecture rules, scoring a branch, finding hotspots or duplication, or analyzing…

agentis-tools/ctx · 60 tokens

lemma-user

Operate an existing Lemma pod from the CLI as a human or agent: inspect resources, query tables and records under RLS, search and read pod files (converted markdown, page images), run functions and workflows, submit waiting workflow forms, chat with pod agents, message pod members, and execute third-party connector…

lemma-work/lemma-platform · 81 tokens

lemma-builder

Design and build complete Lemma pods: model tables/files/functions/agents/workflows/schedules/connectors/surfaces/apps from a problem statement, author a local pod bundle, import progressively with the Lemma CLI, and verify every layer. Use for pod design, creation, restructuring, import/export, and app development.…

lemma-work/lemma-platform · 85 tokens

lemma-evals

Design, run, and review repeatable evaluations for Lemma agents, functions, and workflows. Use when defining evaluation contracts and case datasets, comparing a baseline with a candidate revision or runtime, checking deterministic correctness or rubric-scored judgment, measuring repeated-run variance, testing…

lemma-work/lemma-platform · 102 tokens

lemma-research

Run rigorous, source-backed research in an existing Lemma pod. Use for investigations, literature or market scans, policy and product research, fact-checking, comparisons, current-information questions, and updates to prior research that require pod files, workspace material, or web sources; exact citations; explicit…

lemma-work/lemma-platform · 89 tokens