Plugin hooks: give skill.prompt the calling agent's id

Open Beginner friendly
#110,517 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
api

Research direction

Start by reading the definitions of SkillPromptInput and AgentLoop mentioned in the issue, then trace where skill.prompt inputs are constructed and exposed to plugins. Add the optional agentId field with the stated main-loop behavior. Done when plugins can read the calling agent's id for subagents and it is absent on the main loop; check the relevant type and hook tests.

Written by the indexing model from the issue text.

Description

area:hooks area:plugins area:skills enhancement

skill.prompt's input (SkillPromptInput, 2.1.325) has no agentId, while tool.call has one (AgentLoop). A plugin that answers a skill differently for the main conversation and for a subagent can't tell which one called it. In Code Mode it can't listen to tool.call to find out, because that turns Code Mode off.

Request: add agentId?: string to SkillPromptInput, as AgentLoop defines it (absent on the main loop).

Dominant language
TypeScript
Stars
156k
Forks
25k
Avg merge
12h 27m
Merged PRs (30d)
4

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anthropics/claude-code

All issues in anthropics/claude-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.