Skip to main content

Module claude_code_session

Module claude_code_session 

Source
Expand description

Claude Code-specific rendering of session-start context.

The available-skills reminder is a harness-specific surface: Claude Code presents discoverable skills to an agent as “The following skills are available for use with the Skill tool:” followed by - name: description bullets. Plan-mode context is injected as a <system-reminder> block. Both live in an adapter rather than the harness- agnostic orchestrator so a new harness adds its own renderer alongside.

Functions§

render_available_skills_block
Render the list of discoverable skills the way a real Claude Code session surfaces them, so an eval dispatch mirrors a genuine session rather than announcing itself as an eval. Returns an empty string when no skills are staged (the caller omits the block entirely in that case).
render_plan_mode_context
Render a plan-mode profile the way Claude Code injects an operating mode into a live session: as a <system-reminder> block the agent is told it is operating under, not prose it merely reads. Returns an empty string for empty input so the caller can omit the section entirely.
resolve_subagents_dir_for_session
Locate the subagents transcript dir for a Claude Code session.
slugify_project_path
Slugify an absolute path the way Claude Code names its project directories: every non-alphanumeric character becomes -. For example /Users/x/.config/oc-Users-x--config-oc (the / before .config and the . each map to a -, producing the double hyphen).