spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / sec-default / hooks / skill-row / is-skill-row.ts
GitHub Actions (publish-mods)chore: Update mods/ 3deb873 · 14 days ago History
15 lines · 530 BRaw
1import type { Args } from 'claude-code'
2
3import { SKILL_TOOL } from './skill-tool.js'
4
5/**
6 * Whether a row on its way into the conversation is one a call of the Skill
7 * tool hands over: a skill's body, an organization's among them.
8 *
9 * Whose skill it is the row does not say, so every such row counts.
10 *
11 * @param e the row, as `session.append` carries it
12 * @returns true for a Skill call's row
13 */
14export const isSkillRow = (e: Args<'session.append'>): boolean =>
15 e.origin.kind === 'tool' && e.origin.tool === SKILL_TOOL