Why not just look through the actual Claude code codebase and use your own AI to deconstruct it
https://github.com/codeaashu/claude-code