composables

A command for creating Vue composables, which are reusable pieces of Vue code for state, web requests, browser interactions, or utility logic. It follows the project's existing TypeScript and Vue 3 conventions.

In plain words
What is it for?
Use it to create or improve composables, add typing and lifecycle cleanup, and produce tests and usage documentation.
Why use it?
It helps avoid duplicated code and inconsistent patterns when adding reusable behaviour to a Vue application.

Command for Claude Code

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.

agentmods
npx agentmods add commands/justdvp/claude-code-templates/composables
Clone the repo
git clone --depth 1 https://github.com/Justdvp/claude-code-templates

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00503
Opus 5 $0.00000 $0.00251
Sonnet 5 $0.00000 $0.00101
Haiku 4.5 $0.00000 $0.00050

Measured 2d ago against content hash 0b9e2c215f17, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

composables 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 2d 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.

cli-tool/templates/javascript-typescript/examples/vue-app/.claude/commands/composables.md · 51 lines

How it starts

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

Vue Composables

Create Vue composables for $ARGUMENTS following project conventions.

Task

Create or optimize Vue composables based on the requirements:

  1. Analyze existing composables: Check project for existing composable patterns, naming conventions, and file organization
  2. Examine Vue setup: Verify Vue 3 Composition API usage and TypeScript configuration
  3. Identify composable type: Determine the composable category:
    • State management (reactive data, computed properties)
    • API/HTTP operations (data fetching, mutations)
    • DOM interactions (event listeners, element refs)
    • Utility functions (validation, formatting, storage)
    • Lifecycle management (cleanup, watchers)
  4. Check dependencies: Review existing composables to avoid duplication
  5. Implement composable: Create composable with proper TypeScript types and reactivity
  6. Add lifecycle management: Include proper cleanup with onUnmounted when needed
  7. Create tests: Write comprehensive unit tests for composable logic
  8. Add documentation: Include JSDoc comments and usage examples

Implementation Requirements

  • Follow project's TypeScript conventions and interfaces
  • Use appropriate Vue reactivity APIs (ref, reactive, computed, watch)
  • Include proper error handling and loading states
  • Add cleanup for side effects (event listeners, timers, subscriptions)
  • Make composables reusable and focused on single responsibility
  • Consider performance implications (shallow vs deep reactivity)

Common Composable Patterns

Based on the request:

  • Data fetching: API calls with loading/error states
  • Form handling: Input management, validation, submission
  • State management: Local state, persistence, computed values
  • DOM utilities: Element refs, event handling, intersection observer
  • Storage: localStorage, sessionStorage, IndexedDB
  • Authentication: User state, token management, permissions
  • UI utilities: Dark mode, responsive breakpoints, modals

Read the full file on GitHub · 51 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. 2d ago First seen · 51 lines · 0 tokens per session scan A 0b9e2c215f17

Subscribe to this mod's changes

composables is a command published in the GitHub repository Justdvp/claude-code-templates (7 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 503 tokens. 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.