skills/doubleslashse/codebase-analysis/SKILL.md
Techniques for analyzing existing codebases to reverse-engineer requirements and understand business logic. Use when conducting brownfield analysis or understanding existing system capabilities.
npx skillsauth add aiskillstore/marketplace codebase-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides techniques for extracting business requirements, domain knowledge, and technical specifications from existing codebases.
When analyzing a codebase, seek to understand:
Look for these patterns:
// C# Entity
public class Order { ... }
// Java Entity
@Entity
public class Order { ... }
// TypeScript Interface
interface Order { ... }
// Database Schema
CREATE TABLE orders ( ... )
Watch for these keywords and patterns:
Validate, Check, Ensure, Must, ShouldCalculate, Compute, Total, SumIf, When, Unless, OnlyMax, Min, Required, LimitIdentify business logic in:
// Service classes
public class OrderService { ... }
// Use cases / Application services
public class CreateOrderUseCase { ... }
// Command/Query handlers
public class CreateOrderHandler { ... }
Look for:
// REST Controllers
[Route("api/orders")]
[HttpPost]
public async Task<Order> Create(...)
// Express routes
app.post('/api/orders', ...)
// GraphQL resolvers
Mutation: { createOrder: ... }
class, interface, type definitionsModels, Entities, Domainthrow statements (business exceptions)## Entity: Order
### Attributes
| Name | Type | Description | Constraints |
|------|------|-------------|-------------|
| id | UUID | Unique identifier | Required |
| status | Enum | Order status | Required |
| total | Decimal | Order total | >= 0 |
### Relationships
- Order has many OrderItems (1:N)
- Order belongs to Customer (N:1)
### Business Rules
- Order total must equal sum of item totals
- Status can only transition: Draft -> Submitted -> Approved -> Completed
## Rule: Order Validation
### Description
Orders must meet these criteria before submission
### Conditions
1. Order must have at least one item
2. All items must have valid product references
3. Customer must have valid payment method
4. Total must be greater than $0
### Implementation
- File: src/Services/OrderService.cs
- Method: ValidateForSubmission()
- Line: 145-180
## Integration: Payment Gateway
### Type
REST API (Synchronous)
### Endpoint
POST https://api.payments.com/v1/charges
### Data Flow
- Input: Order total, Customer payment token
- Output: Transaction ID, Status
### Error Handling
- Timeout: Retry 3 times with exponential backoff
- Failure: Mark order as payment pending, notify support
### Implementation
- File: src/Integrations/PaymentGateway.cs
# C# / .NET
grep -r "public class.*Entity" --include="*.cs"
grep -r "\[Table\(" --include="*.cs"
# Java
grep -r "@Entity" --include="*.java"
# TypeScript
grep -r "interface.*{" --include="*.ts"
# C# Attributes
grep -r "\[Required\]|\[Range\]|\[StringLength\]" --include="*.cs"
# Java Annotations
grep -r "@NotNull|@Size|@Valid" --include="*.java"
# Custom validation
grep -r "Validate|throw.*Exception" --include="*.cs"
# .NET Controllers
grep -r "\[Http.*\]|\[Route\(" --include="*.cs"
# Express.js
grep -r "app\.(get|post|put|delete)\(" --include="*.js"
After analysis, you should be able to answer:
See patterns.md for common architectural patterns to identify.
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.