Skip to content
Back to skills

2604 Command Lifecycle 22785147

ASecurity

Understand how a command runs end‑to‑end (~4 minutes). ---

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentpythonapibackend

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2604-command-lifecycle_22785147 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2604 Command Lifecycle 22785147?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2604 Command Lifecycle 22785147
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2604-command-lifecycle-22785147/badge)](https://www.skillsdirectory.com/skills/tools-only-2604-command-lifecycle-22785147)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Command Lifecycle

Understand how a command runs end‑to‑end (~4 minutes).

---

## Sequence (no tools)

```mermaid
sequenceDiagram
  participant U as Your code
  participant C as Command wrapper
  participant B as Backend adapter
  participant P as Provider API
  participant T as Type system

  U->>C: call my_cmd(args)
  C->>B: build request (config, schema)
  B->>P: create response
  P-->>B: final answer
  B->>T: parse/validate (if schema)
  T-->>C: Python object / str
  C-->>U: return value
```

## Sequence (with tools, strict output)

```mermaid
sequenceDiagram
  participant U as Your code
  participant C as Command wrapper
  participant B as Backend adapter
  participant P as Provider API
  participant L as Tools layer
  participant T as Type system

  U->>C: call my_cmd(args)
  C->>B: build request (tools+schema)
  loop tool calls (max_tool_turns)
    B->>P: respond (tool call)
    P-->>B: tool request
    B->>L: invoke @tool(args)
    L-->>B: tool result (or contract message)
    B->>P: tool_result
  end
  alt no final structured output
    B->>P: one final turn (no tools) to finalize
  end
  P-->>B: final answer
  B->>T: parse/validate
  T-->>C: typed object
  C-->>U: return value
```

## Notes

- Finalization: for providers that require it, Alloy may issue one final turn (without tools) to obtain a structured answer when tools were used and no final was returned.
- Limits: the tool loop is capped by `max_tool_turns` (default 10) to avoid runaway behavior.
- Errors: configuration errors surface immediately; parse failures raise `CommandError` with expected type/context.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.