astro-file-editor

astro-file-editor is an agent for Claude Code from teamniteo/hakuto. It costs 84 tokens per session (1,481 once invoked), scanned A, original, MIT.

An agent for creating and editing Astro files, which are web-page files used by the Astro framework, with Tailwind CSS and shadcn/ui components.

In plain words
What is it for?
Use it to create pages and components, convert React code to Astro, manage component data and slots, optimize images, and inspect the project's existing configuration and patterns.
Why use it?
It helps keep new or changed landing-page code consistent with the project's Astro structure, styling setup, and reusable components.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions AGENTS.md.

Part of the hakuto plugin — 14 skills, 1 command, 1 agent shipped together

Good fit Use it to create pages and components, convert React code to Astro, manage component data and slots, optimize images, and inspect the project's existing configuration and patterns.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/teamniteo/hakuto/astro-file-editor
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.

Clone the repo
git clone --depth 1 https://github.com/teamniteo/hakuto

Made for: Claude Code.

Or install hakuto, the plugin that ships this one along with the rest of its 14 skills, 1 command, 1 agent.

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 astro-file-editor

README.md
[![agentmods](https://agentmods.dev/badge/agents/teamniteo/hakuto/astro-file-editor/github.svg)](https://agentmods.dev/agents/teamniteo/hakuto/astro-file-editor)
Your own site
<a href="https://agentmods.dev/agents/teamniteo/hakuto/astro-file-editor"><img src="https://agentmods.dev/badge/agents/teamniteo/hakuto/astro-file-editor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for astro-file-editor

Your own site · 80×15
<a href="https://agentmods.dev/agents/teamniteo/hakuto/astro-file-editor"><img src="https://agentmods.dev/badge/agents/teamniteo/hakuto/astro-file-editor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,481 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.
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.00084 $0.01481
Opus 5.5 $0.00034 $0.00592
Sonnet 5.5 $0.00017 $0.00296
Haiku 4.5 $0.00008 $0.00148

Measured 7d ago against content hash c1a57977232a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

astro-file-editor 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.

agents/astro-file-editor.md · 105 lines

How it starts

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

Astro File Editor

You write and edit .astro files for a Hakuto site (Astro 6, Tailwind CSS v4, shadcn/ui, Cloudflare). You are called by website-builder or a section skill with a concrete brief; design decisions — direction, dials, palette, fonts, copy — are already made and recorded in site-specification.md. Build to the spec's Current style; don't invent a new look. The project's AGENTS.md is the authority on conventions; this file is the condensed version for file-level work.

Before writing

Read, in parallel:

package.json            → Astro version, installed deps
site-specification.md   → direction, dials, palette roles, fonts, Current style
src/index.css           → theme tokens (colors, font roles, spacing, radius)
src/lib/site.ts         → SITE_NAME, SITE_DESCRIPTION, SITE_CONTACT
src/layouts/Layout.astro → props it accepts (title, description, schema, …)
Glob src/components/**/*.astro → existing structure and naming to match

Rules

  1. File types. Pages and layouts are .astro. Sections and static components are .astro. A .tsx file is right only for a React island: a whole Radix compound component (Select, Dialog, Tabs…) wrapped as one component and used once with client:load, or a form from section-form. Dropping compound sub-components into .astro piece by piece breaks their shared React context.
  2. class vs className. Native HTML in .astro uses class. React/shadcn components take className — <Button className="...">; <Button class="..."> fails astro check, and @astrojs/react drops the class prop at render anyway.
  3. shadcn/ui (43 components in src/components/ui/) render in .astro without a client directive unless they need interactivity. Import from @/components/ui/….
  4. Styling. Tailwind utilities that reference tokens from src/index.css (bg-primary, text-muted-foreground, font-display). No inline styles, no CSS modules, no hard-coded palette utilities (bg-blue-500) — the palette lives in the tokens so a re-palette touches one file.
  5. Fonts are wired through the Astro Fonts API by the fonts skill. Use the role utilities (font-display, font-sans, font-mono); never add @import or @font-face. If a needed font isn't configured, report back rather than wiring it yourself.
  6. Images. Local images: <Picture> from astro:assets, imported from src/assets/, with formats={['webp']}, width={W}, widths={[W, W * 2]} and sizes — all three, or no srcset is emitted. Omit height unless a crop is intended. A .webp/.avif source also needs fallbackFormat="webp". External URLs (Unsplash placeholders) use plain <img> with width/height and loading="lazy" below the fold.
  7. Icons: lucide-react.
  8. Imports use the @/ alias for src/.
  9. Props are typed with interface Props and read from Astro.props.
  10. Client directives only for true interactivity — every island ships JS.
  11. Copy. Use the copy you were given verbatim. Placeholder text you have to invent starts with TODO: so the prelaunch checklist finds it.
  12. Anchors: every href="#id" has a matching id. Clickable non-link elements get cursor-pointer.

Read the full file on GitHub · 105 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 Changed · -243 lines · +28 tokens per session c1a57977232a
  2. 1mo ago First seen · 348 lines · 56 tokens per session scan A 6a98e0638431

Subscribe to this mod's changes

astro-file-editor is an agent published in the GitHub repository teamniteo/hakuto (6 stars, last pushed 8d ago), licensed MIT. It adds 84 tokens to every session and 1,481 once invoked, about $0.0003 per session on Opus 5.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-08-31.

Related

Other agents, from other repositories

your-agent-name

Brief description of what this agent does (1-2 sentences).

pjt222/agent-almanac · 17 tokens

research-expert

Specialized research expert for parallel information gathering. Use for focused research tasks with clear objectives and structured output requirements.

dork-labs/dorkos · 26 tokens

code-review-expert

Deep code review specialist using a 9-layer methodology — root cause analysis, cross-file intelligence, and impact-based prioritization. Use PROACTIVELY after significant code changes, refactors, or before merging PRs.

GoogilyBoogily/googilyboogily-claude-power-tools · 49 tokens

git-expert

Git workflow, merge conflict, and repository recovery expert. Use PROACTIVELY for merge conflicts, rebase failures, history rewriting, detached HEAD, lost commits, branching strategy decisions, or any git error message you cannot resolve.

GoogilyBoogily/googilyboogily-claude-power-tools · 50 tokens

refactoring-expert

PROACTIVELY invoke when encountering duplicated code, long methods, complex conditionals, deep nesting, primitive obsession, or any structural code quality issue. Detects code smells and applies proven refactoring techniques without changing external behavior.

GoogilyBoogily/googilyboogily-claude-power-tools · 50 tokens

research-expert

PROACTIVELY use when the task requires web research, fact-finding, or gathering information from multiple sources. Triggers on research questions, "look up", "find out", comparison requests, or when current/external information is needed.

GoogilyBoogily/googilyboogily-claude-power-tools · 53 tokens