Agents In Use
What’s new todayLast update
108 use cases added today

How to use Claude to build a rules compiler CLI

The author published dev-workflows v0.1 on npm with six commands, three editor bridges, six rule blocks, and 54+ passing tests.

Source published dev.toAgent: Claudevia Claude Code
OUR ADAPTATION

Suggested prompt

Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.

Use [CLI_SPEC.md] to build [rules compiler CLI]. Scaffold commands, implement YAML parsing and bridges for [editors], add reusable blocks, and configure CI. Dogfood it on [repository], preserving manual content and versioned source rules.

Evidence at a glance

Sourced account
Source author
gpolanco
Original account
Read the source ↗
Published
Source link checked
Reported result
The author published dev-workflows v0.1 on npm with six commands, three editor bridges, six rule blocks, and 54+ passing tests.
Human involvement
The author used the CLI on its own repository and identified three bugs that the tests had missed.

A linked account supports attribution. It does not mean we independently reproduced its result.

Report an issue with this caseOpen correction email

Opens your email app with the case link included. Nothing is sent automatically.

How the agent did it

  1. Reduced the planning documents to CLI_SPEC.md and DECISIONS.md.
  2. Gave Claude Code the spec and scaffolded commands and compilation bridges.
  3. Added reusable rule blocks and command tests.

The author had two projects addressing duplicated rules across coding editors: a deployed web application they did not use and a CLI that existed only as documentation. They chose the CLI, reduced five planning documents to an implementation specification and a decision log, and handed the specification to Claude Code.

The morning work established the command-line package, TypeScript configuration, and command stubs. It then added initialization with tool detection and interactive prompts, followed by a YAML parser and separate output bridges for Claude Code, Cursor, and Gemini CLI. A doctor command checked the generated setup. The next sprint added a registry and installer for reusable rule blocks, along with add, remove, and list commands.

The afternoon covered the README, npm configuration, GitHub Actions, and changesets. Crucially, the author used the CLI on its own repository. This exposed overwritten manual CLAUDE.md content, source rules being ignored by Git, and crashes on invalid prompt input. The post describes fixes for all three. By day's end, the CLI was published on npm with six commands, three bridges, six blocks, and more than 54 passing tests.

Who it's for: Developers maintaining the same project rules across multiple coding editors.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: dev.to · gpolanco

Frequently asked questions

What did the CLI compile?

It compiled rules defined in YAML into native formats for Claude Code, Cursor, and Gemini CLI.

What did dogfooding uncover?

It found complete CLAUDE.md overwrites, an overly broad .gitignore entry for .dwf/, and stack traces from invalid interactive input.

More details

Remaining steps

  1. Dogfooded the CLI, fixed three discovered bugs, and published to npm.

About this account

Claude Code implemented the CLI from a concise specification across core, rule-block, and shipping work.

Platform: dev.to. Attribution: https://dev.to/gpolanco/stop-duplicating-rules-manage-agentic-editors-with-one-cli-20j6. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.

Credit: gpolanco on dev.to

Source published

Added to Agents In Use

Source checked

Tools and topics

Claude Code · TypeScript · commander · GitHub Actions · changesets · npm

CLI · Rules management · Dogfooding

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.