agentleFS
AnjanJAnjanJ/rails_error_dashboard/.claude/skills/new-feature/SKILL.md

new-feature

Skill93 starsChanged 8 days agoMITView on GitHub

Scaffold a new CQRS class (command, query, or service) with spec following project conventions

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use evidence-driven-testing, greploop-apps and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • jaydubya818Skill

    evidence-driven-testing

    Capture observable runtime proof with video, screenshots, or measured output. Use when a change needs evidence beyond test reports.

    Also in 6 projects that use this

  • jaydubya818Skill

    greploop-apps

    Run greploop through @greptile-apps when the normal trigger rejects a large PR. Use only with the companion greploop skill.

    Also in 4 projects that use this

  • VercelSkill

    before-and-after

    Add existing screenshots or screen recordings to a GitHub pull request as a before/after or preview block. Use when a PR needs visual media attached to its description. Browser navigation and capture belong to agent-browser.

    Also in 6 projects that use this

  • BboyfaroukSkill

    greploop

    Iteratively improves a PR until Greptile gives it a 5/5 confidence score with zero unresolved comments. Triggers Greptile review, fixes all actionable comments, pushes, re-triggers review, and repeats. Use when the user wants to fully optimize a PR against Greptile's code review standards.

    Also in 6 projects that use this

  • u9401066Skill

    bug-fix

    Structured bug fixing workflow with root cause analysis and regression prevention. Triggers: BF, 修 bug, fix bug, debug, 除錯, 錯誤, error, 問題, issue, 修復, fix, 故障, fault, 異常, exception, 失敗, failure, 不能用, broken, 壞掉.

    Also in 3 projects that use this

  • SvampenSkill

    init-project

    Generates a tailored .claude/project-config.md for the current project. Asks about project type, quality check commands, documentation paths, insight tags, and review strictness.

    Also in 4 projects that use this

  • +1 more from jaydubya818

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a new command, query, or service class following the project's CQRS conventions.

    line 9
  2. Very specific:

    If no arguments provided, ask the user: "What type (command/query/service) and what name?"

    line 17
  3. Distinctive:

    Follow this pattern (read an existing file from the same directory for reference):

    line 33
  4. Distinctive:

    Follow this pattern (read an existing spec from the same directory for reference):

    line 46
  5. Very specific:

    Test self.call factory method

    line 48
  6. Distinctive:

    Test edge cases (nil input, empty data, errors)

    line 50
  7. Very specific:

    If the class needs to be autoloaded, check if lib/rails_error_dashboard.rb needs an autoload entry

    line 57
  8. Very specific:

    If the class adds a dashboard feature, check if config/routes.rb needs a route

    line 58
  9. Very specific:

    If the class adds a config option, add it to lib/rails_error_dashboard/configuration.rb

    line 59
  10. Distinctive:

    Always read at least one existing file from the target directory to match:

    line 63
  11. Distinctive:

    Run the new spec to verify it passes:

    line 71
  12. Distinctive:

    Run RuboCop on the new files:

    line 75

“Common” is measured: kept by at least 6 in 10 of the 39 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/new-feature — Scaffold CQRS Class + Spec

Create a new command, query, or service class following the project's CQRS conventions.

Usage

  • /new-feature command LogSomething — create a command
  • /new-feature query SomeStats — create a query
  • /new-feature service SomeCalculator — create a service

If no arguments provided, ask the user: "What type (command/query/service) and what name?"

Scaffolding Rules

1. Determine the Layer

TypeDirectoryPurposeVerb Style
commandlib/rails_error_dashboard/commands/Write operationsAction verb (LogError, ResolveError)
querylib/rails_error_dashboard/queries/Read operationsNoun/adjective (ErrorsList, DashboardStats)
servicelib/rails_error_dashboard/services/Pure algorithmsAlgorithm name (ErrorNormalizer, SimilarityCalculator)

2. Create the Class File

File name: lib/rails_error_dashboard/<type>s/<snake_case_name>.rb

Follow this pattern (read an existing file from the same directory for reference):

  • Module: RailsErrorDashboard::<Type>s::<ClassName>
  • Factory method: def self.call(...)
  • Constructor: def initialize(...)
  • Instance method: def call
  • Commands: rescue errors, never raise in capture path
  • Queries: return data, never mutate
  • Services: pure computation, no DB access

3. Create the Spec File

Spec path: spec/<type>s/rails_error_dashboard/<snake_case_name>_spec.rb

Follow this pattern (read an existing spec from the same directory for reference):

  • RSpec.describe RailsErrorDashboard::<Type>s::<ClassName> do
  • Test self.call factory method
  • Test main behavior
  • Test edge cases (nil input, empty data, errors)
  • Commands: test that errors are rescued (never raise)
  • Queries: test filters, sorting, empty results
  • Services: test computation accuracy, edge cases

4. Register if Needed

  • If the class needs to be autoloaded, check if lib/rails_error_dashboard.rb needs an autoload entry
  • If the class adds a dashboard feature, check if config/routes.rb needs a route
  • If the class adds a config option, add it to lib/rails_error_dashboard/configuration.rb

Before Creating

Always read at least one existing file from the target directory to match:

  • Exact module nesting
  • Code style (rails-omakase, array brackets with inner spaces)
  • Error handling patterns
  • ActiveSupport::Notifications instrumentation (commands)

After Creating

  1. Run the new spec to verify it passes:
    bundle exec rspec spec/<type>s/rails_error_dashboard/<snake_case_name>_spec.rb
  2. Run RuboCop on the new files:
    bundle exec rubocop lib/rails_error_dashboard/<type>s/<snake_case_name>.rb spec/<type>s/rails_error_dashboard/<snake_case_name>_spec.rb

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.