codebaseanalyser
- Repo stars 5
- License MIT
- Author repo AINativeBook
- Domain
- DevOps
- Author-declared agents
- No explicit declaration found; this is not inferred or tested compatibility
- Static check
- 94 / 100 · heuristic scan, not runtime safety proof
- Runtime evidence
- Not run; no isolated runtime test evidence is currently recorded
- Author / version / license
- @SARAMALI15792 · MIT
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No explicit requirements detected
- Detected file/system behavior
-
- Read-only
- Write / modify
- Shell exec
- Env read
- Network behavior
- External requests
- Install commands
- None (reference only)
Heads up: Tool permissions are not declared; actual access depends on the runtime.
Analyze the complete project structure Identify: Frontend framework and architecture Backend framework and architecture Database type and connection method
Identify: Login route Registration route Token generation logic Token validation middleware
Check every import/export Verify that: All API routes match frontend calls All controllers are properly connected All middleware is applied
Analyze: Build process Environment variables in hosting platform Backend server configuration Reverse proxy (if any)
Implement a CI/CD solution that: Automatically runs tests on: Every push Every pull request Tests:
Create: Refactoring suggestions Security improvements Logging improvements Monitoring suggestions
# Codebase Analyser
Perform comprehensive deep analysis of entire codebase and deployment pipeline to identify why functionality is not working correctly in production. Execute systematic investigation across all aspects of the application including architecture, authentication, file-level connections, deployment, CI/CD pipeline, and stability improvements.
## When to Use This Skill
Use this skill when:
- Deployed application functionality is not working correctly in production
- Need comprehensive deep analysis of entire codebase
- Authentication system issues in production
- Deployment pipeline debugging is required
- CI/CD setup for auto-testing is needed
- Stability improvements and refactoring suggestions are required
- File-level and line-level connection audits are needed
## How to Execute the Skill
### Phase 1: Perform Full Codebase Architecture Analysis
1. Analyze the complete project structure
2. Identify:
- Frontend framework and architecture
- Backend framework and architecture
- Database type and connection method
- Authentication system implementation
- API communication pattern
- Environment configuration (.env usage)
- Deployment configuration
3. Create a clear architecture map showing:
- How frontend communicates with backend
- How backend communicates with database
- How authentication flows through the system
### Phase 2: Execute Authentication System Deep Trace
1. Identify:
- Login route
- Registration route
- Token generation logic
- Token validation middleware
- Session or JWT handling
- Password hashing method
- Cookie handling (if any)
2. Trace authentication flow step-by-step:
- User submits login form (frontend)
- Request sent to backend
- Backend processes credentials
- Token created
- Token returned to frontend
- Token stored (localStorage/cookies)
- Protected routes accessed
3. Check for:
- CORS issues
- Missing credentials in fetch/axios
- Wrong base URLs
- Environment variable misconfiguration
- Production vs development differences
- Missing middleware
- Expired tokens
- Wrong secret keys
- API route mismatches
### Phase 3: Execute File-Level and Line-Level Connection Audit
1. Check every import/export
2. Verify that:
- All API routes match frontend calls
- All controllers are properly connected
- All middleware is applied
- Database models are properly registered
- No circular dependencies exist
3. Identify any dead code or unused functions
4. Detect any runtime-only production errors
Provide a categorized issue list:
- Critical
- Major
- Minor
### Phase 4: Execute Deployment & Production Debugging
Analyze:
- Build process
- Environment variables in hosting platform
- Backend server configuration
- Reverse proxy (if any)
- Port binding
- Production logs
- CORS production policy
- HTTPS issues
Explain why it might work locally but fail after deployment.
### Phase 5: Implement CI/CD Pipeline Setup for Auto-Testing
Implement a CI/CD solution that:
1. Automatically runs tests on:
- Every push
- Every pull request
2. Tests:
- API endpoints
- Authentication flow
- Database connection
- Environment variable validation
- Frontend build success
3. Fails deployment if tests fail
4. Runs linting and type-checking
5. Verifies that backend can start successfully
6. Verifies that frontend can build without errors
Provide:
- Suggested GitHub Actions (or CI provider) config
- Example workflow YAML file
- Suggested test structure
- Suggested test libraries
### Phase 6: Create Stability Improvement Plan
Create:
1. Refactoring suggestions
2. Security improvements
3. Logging improvements
4. Monitoring suggestions
5. Error handling improvements
6. Recommended production-grade best practices
## Resources Available
- Run `scripts/codebase_analysis.py` for automated codebase analysis
- Reference `references/production_debugging.md` for common production issues and debugging patterns
- Use `assets/github-workflow.yml` as a template for CI/CD workflow
## Important Guidelines
- Do not give generic advice
- Analyze the actual code deeply
- Explain root causes clearly
- Provide fixes with code examples
- Be systematic and structured
- Focus on production-specific issues
- Prioritize critical issues that prevent functionality
- Identify environment-specific configurations
- Ensure comprehensive coverage of all system components Listed in source order.
sections -> When to Use This Skill → How to Execute the Skill → Phase 1: Perform Full Codebase Architecture Analysis → Phase 2: Execute Authentication System Deep Trace → Phase 3: Execute File-Level and Line-Level Connection Audit → Phase 4: Execute Deployment & Production Debugging
terms -> Explain why it might work locally but fail after deployment. · 1. Automatically runs tests on: - Every push - Every pull request 2. · 1. Refactoring suggestions 2.
files/cmd -> scripts/codebase_analysis.py · references/production_debugging.md · assets/github-workflow.yml · CI/CD · localStorage/cookies · fetch/axios · import/export
body sha256 -> 72668f33e125
When to Use This Skill
Use this skill when: Deployed application functionality is not working correctly in production Need comprehensive deep analysis of entire codebase Authentication system issues in production Deployment pipeline debugging is required
Phase 1: Perform Full Codebase Architecture Analysis
Analyze the complete project structure Identify: Frontend framework and architecture Backend framework and architecture Database type and connection method
Phase 2: Execute Authentication System Deep Trace
Identify: Login route Registration route Token generation logic Token validation middleware
Phase 3: Execute File-Level and Line-Level Connection Audit
Check every import/export Verify that: All API routes match frontend calls All controllers are properly connected All middleware is applied
Phase 4: Execute Deployment & Production Debugging
Analyze: Build process Environment variables in hosting platform Backend server configuration Reverse proxy (if any)