[FEATURE] [Command] "/example" slash command — use an existing file/project as a template for new ones

Resolved 💬 2 comments Opened Apr 6, 2026 by HadjievK Closed May 17, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When creating something new (a file, component, module, or full project) that should follow the same structure as an
existing one, users currently have to write prompts like:

▎ "Create a project like [path/to/example], but for X"

This works, but it's verbose and relies on Claude inferring the right context from a natural-language description.

Proposed Solution

Add a /example slash command that explicitly marks one or more files or a directory as the reference template for the current task.

Alternative Solutions

Usage examples:

/example src/services/UserService.ts
→ Now create a ProductService with the same structure

/example ./projects/my-express-app
→ Create a new project called my-graphql-app with the same layout

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

Usage examples:

/example src/services/UserService.ts
→ Now create a ProductService with the same structure

/example ./projects/my-express-app
→ Create a new project called my-graphql-app with the same layout

Additional Context

Why This Is Useful

  • Makes intent explicit — no ambiguity about what to model the new artifact on
  • Reduces prompt length and back-and-forth
  • Consistent with how developers already think ("make it like this one")
  • Complements existing slash commands like /init and /memory

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗