One-click install
npx skills add https://github.com/PM4-SmartFinance/SmartFinance --skill api-and-interface-design-pm4-smartfinance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/PM4-SmartFinance/SmartFinance/tree/main/.claude/skills/api-and-interface-design
Command: npx skills add https://github.com/PM4-SmartFinance/SmartFinance --skill api-and-interface-design-pm4-smartfinance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the design and management of API endpoints, module boundaries, and TypeScript contracts, facilitating consistent and scalable software architecture.

Core Features & Use Cases

  • REST Endpoint Design: Guides the creation of stable REST endpoints, ensuring adherence to versioning and contract standards.
  • Module Boundary and Contract Definition: Offers best practices for designing clear and maintainable module interfaces.
  • TypeScript Contract Management: Ensures consistency between backend and frontend by managing TypeScript interfaces and response schemas.
  • Use Case: When adding new endpoints to /api/v1, defining service and repository signatures, or shaping component prop contracts, this Skill provides a comprehensive guide to maintain a robust API structure.

Quick Start

Run the skill to design a new REST endpoint for the /api/v1/transactions resource, ensuring compliance with RESTful principles and TypeScript type safety.

Frequently Asked Questions about api-and-interface-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design REST endpoints with consistent versioning and error responses?

Designing REST endpoints with consistent versioning and error responses requires a structured approach that enforces RESTful principles and standardizes error response shapes. This Skill provides a comprehensive guide to maintain a robust API structure.

What is the best way to manage TypeScript contracts between frontend and backend?

Managing TypeScript contracts between frontend and backend ensures consistency by defining shared TypeScript interfaces and response schemas. This Skill guides the creation of clear module boundaries to maintain type safety across your software architecture.

How do I implement JSON Schema validation and RBAC for a new API resource?

Implementing JSON Schema validation and RBAC for a new API resource involves defining strict request and response schemas alongside role-based access controls. This Skill offers a structured approach to document these contracts when adding endpoints like /api/v1/transactions.

Can I use this approach to define service and repository signatures in TypeScript?

Yes, you can use this approach to define service and repository signatures in TypeScript. The Skill offers best practices for designing clear and maintainable module interfaces, ensuring robust boundaries between your backend services and data repositories.

When do I need structured TypeScript contract management for my software architecture?

You need structured TypeScript contract management when adding new endpoints to `/api/v1` or shaping component prop contracts to ensure scalability. It streamlines the design of module boundaries and response schemas, facilitating consistent backend and frontend integration.