agentleFS
igmarinigmarin/rails-agent-skills/skills/document-engine/SKILL.md

document-engine

Skill26 starsChanged 4 months agoMITView on GitHub

Use when writing engine README, install, and configuration docs. Trigger words: engine README, install guide, engine docs.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when writing or maintaining documentation for Rails engines.

    line 16
  2. Distinctive:

    Keep sections short and task-oriented.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Document Engine

Use this skill when writing or maintaining documentation for Rails engines.

Core Process & Constraints

StepSectionFocus
1Installationgem add, bundle, run install generator — show minimum working path first
2Host AssumptionsExplicitly state any host model, job backend, or auth integration assumptions
3ConfigurationAll options with defaults, required vs optional
4MountingExplicit mount MyEngine::Engine, at: '/path' in routes — show once only
5UsageCopyable code for typical workflows
6MigrationsInstall generator, one-time setup, upgrade-impacting changes

Hard gate: All generated documentation MUST satisfy steps 1, 2, and 3 above before proceeding to optional sections.

README snippet (install + mount):

## Installation

Add to your Gemfile:

    gem 'my_engine'

Run:

    bundle install
    rails generate my_engine:install

This creates `config/initializers/my_engine.rb`. Mount the engine in `config/routes.rb`:

    mount MyEngine::Engine, at: '/admin'

Configuration section:

## Configuration

In `config/initializers/my_engine.rb`:

    MyEngine.configure do |config|
      config.user_class = "User"       # required: host model for current user
      config.widget_count = 10         # optional, default 10
    end

Extended Resources

See CHECKLIST.md for the full recommended README shape and documentation gap checklist. Critical gaps tracked there: installation steps, all config options with defaults, explicit mount path, migration timing, host model/auth assumptions.

  • assets/configuration.md — detailed config option catalog with type info, validation rules, and all supported defaults
  • assets/examples.md — realistic end-to-end usage examples covering common host-app integration workflows
  • assets/installation.md — step-by-step install and generator reference including post-install setup tasks

Output Style

  1. Keep sections short and task-oriented.
  2. Validate against CHECKLIST.md: a checklist item passes when the docs contain a corresponding section with at least one copyable code example or explicit prose statement; it fails when absent, incomplete, or lacking a concrete example. Fix each failing item, then re-run from the top. Do not finalize until all critical items pass.
  3. Section Delineation: Explicitly label mandatory "Hard-Gate" sections (Installation, Configuration, Host Assumptions) and "Optional" sections (Extension Points, Usage Examples).
  4. Upgrade Notes: Include at least one copyable code example in any Upgrade Notes section.
  5. Language — Must be in English unless explicitly requested otherwise.

Common pitfalls to avoid:

  • Duplicate mount MyEngine::Engine ... across multiple sections — show it only once in the primary installation/mounting section.
  • Syntax errors in Ruby/Rails code examples — double-check route mounting and authentication blocks (e.g., authenticate :user, ->(u) { u.admin? } do).

Integration

SkillWhen to chain
create-engineHost-app contract, structure, extension points to document
create-engine-installerInstall generators, setup steps to document
release-engineChangelog, upgrade notes, version documentation
generate-api-collectionWhen documenting or adding API endpoints (keep Postman collection in sync)

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.