From 799e2cb27c08ef3d322f8b7d8d86c686f4c88fa9 Mon Sep 17 00:00:00 2001 From: jonathanpopham Date: Mon, 13 Apr 2026 14:12:44 -0400 Subject: [PATCH] feat: add supermodel skill command for agent awareness prompt Prints a prompt that teaches AI coding agents how to use Supermodel's graph shard files. Pipe into agent instructions: supermodel skill >> CLAUDE.md supermodel skill >> AGENTS.md Benchmark data shows agents need to be told about shard files to use them effectively. Without prompting, agents ignore or filter them out. With prompting, 43% cost savings on complex multi-file tasks (14-repo A/B test). Closes #118 --- cmd/skill.go | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 cmd/skill.go diff --git a/cmd/skill.go b/cmd/skill.go new file mode 100644 index 0000000..5300398 --- /dev/null +++ b/cmd/skill.go @@ -0,0 +1,38 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +const skillPrompt = `This repository has Supermodel graph shard files next to source files. + +Files ending in .calls.* contain function call relationships (who calls what, with file and line number). +Files ending in .deps.* contain dependency relationships (imports and imported-by). +Files ending in .impact.* contain blast radius data (risk level, affected domains, direct/transitive dependents). + +When navigating the codebase: +- Read .deps files to understand what a module depends on and what depends on it +- Read .calls files to trace call chains across files +- Read .impact files to assess the blast radius before making changes +- These files appear in grep/rg results alongside source code — use the data to navigate faster` + +func init() { + c := &cobra.Command{ + Use: "skill", + Short: "Print agent awareness prompt for graph shard files", + Long: `Prints a prompt that teaches AI coding agents how to use Supermodel's +graph shard files. Pipe into your agent's instructions: + + supermodel skill >> CLAUDE.md + supermodel skill >> AGENTS.md + supermodel skill >> .cursorrules`, + Args: cobra.NoArgs, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println(skillPrompt) + }, + } + + rootCmd.AddCommand(c) +}