api-design
Skill54 starsChanged 3 months agoMITView on GitHub
REST API-designmønstre, versjonering, feilhåndtering (RFC 7807) og OpenAPI-konvensjoner for Nav-tjenester
125 other projects use a version of this.
Adopted by
Most recently taken up by
- AllThingsSmitty/proven-skillstheir own version, first seen Oct 6, 2026
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- SkillMedev/api-integration-engineeringtheir own version, first seen Oct 5, 2026
- SkillMedev/full-stack-web-devtheir own version, first seen Oct 5, 2026
- cellrishi-code/claude-skills-atlastheir own version, first seen Oct 4, 2026
- mnzralee/claude-multi-agent-architecturetheir own version, first seen Oct 3, 2026
Used with
Projects with it also use data-modeling, ci-pipeline and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
mmondoraSkilldata-modeling
Schema design, multi-tenant data isolation, and migration management. Firestore and PostgreSQL patterns, RLS, UUID v7 conventions. Use when designing database schemas, writing migrations, or implementing multi-tenant data access.
Also in 7 projects that use this
vndeeSkillci-pipeline
Use when creating or updating CI/CD pipelines with GitHub Actions or GitLab CI for Go, Python, or React projects
Also in 4 projects that use this
pluginagentmarketplaceSkillmicroservices
Microservices architecture patterns and best practices. Service decomposition, inter-service communication, and distributed data management.
Also in 4 projects that use this
kevinaimonsterSkilltypescript-strict
TypeScript strict mode and advanced type system assistant. Helps write strictly-typed TypeScript code with generics, type guards, utility types, conditional types, mapped types, and template literal types. Trigger when user says 'TypeScript types' 'type gymnastics' 'TypeScript generics' 'strict TypeScript' 'type guard' 'TS类型' 'TypeScript严格模式' '类型体操' '泛型怎么写' 'TS type help'. Keywords: TypeScript, strict mode, generics, type guard, utility types, conditional types, mapped types, template literal types, infer, extends, keyof, typeof, type narrowing, discriminated unions, type assertion, type predicate, type gymnastics, TS, 类型体操, 泛型, 类型守卫, 严格类型
Also in 4 projects that use this
InfopibeSkilldeployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.
Also in 10 projects that use this
DatabricksSkillload-testing
Load test a Databricks App to find its maximum QPS. Use when: (1) User says 'load test', 'benchmark', 'QPS', 'throughput', or 'performance test', (2) User wants to find how many queries per second their app can handle, (3) User wants to set up load testing scripts for their agent, (4) User wants to view load test results/dashboard, (5) User wants to validate results or observe latency/error rate with MLflow tracing.
Also in 4 projects that use this
Other versions125 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 125
- xu-xiang/everything-claude-code-zh★ 2ksame name
- Aaronontheweb/dotnet-skills★ 1.2ksame name
- nth5693/gemini-kit★ 373same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 206same name
- margelo/react-native-skills★ 173same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- cohen-liel/hivemind★ 110same name
- microsoft/haste★ 106same name
115 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- ai-news-researchSkill
- aksel-builderSkill
- aksel-spacingSkill
- conventional-commitSkill
- deliberate-ai-useSkill
- flyway-migrationSkill
- jackson-3-migrationSkill
- java-to-kotlinSkill
- kafkaSkill
- klarsprakSkill
- kotlin-app-configSkill
- ktor-scaffoldSkill
- naisSkill
- nav-architecture-reviewSkill
- nav-authSkill
- nav-deep-interviewSkill
- nav-dekoratorenSkill
- nav-planSkill
- nav-troubleshootSkill
- observability-debuggingSkill
- observability-setupSkill
- playwright-testingSkill
- postgresql-reviewSkill
- readme-reviewSkill
- rust-developmentSkill
- security-owaspSkill
- security-reviewSkill
- spring-boot-scaffoldSkill
- terse-modeSkill
- threat-modelSkill
- tokenx-authSkill
- web-design-reviewerSkill
- workstation-securitySkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 104 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 105
Use offset-based pagination with consistent parameter names:
- Distinctive: line 187
Use URL-based versioning when breaking changes are necessary:
- Distinctive: line 202
Only adding new fields (never removing)
“Common” is measured: kept by at least 6 in 10 of the 104 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Design Skill
REST API design for Nav services. Covers naming conventions, error handling with ProblemDetail, versioning, pagination, and OpenAPI spec.
URL Conventions
# ✅ Correct
GET /api/vedtak # List
GET /api/vedtak/{id} # Get by ID
POST /api/vedtak # Create
PUT /api/vedtak/{id} # Full update
PATCH /api/vedtak/{id} # Partial update
DELETE /api/vedtak/{id} # Delete
# ✅ Sub-resources
GET /api/vedtak/{id}/aktiviteter # List child resources
POST /api/vedtak/{id}/aktiviteter # Create child resource
# ✅ Actions (verb as sub-resource)
POST /api/vedtak/{id}/godkjenn # State transition
# ❌ Wrong
GET /api/getVedtak # Verb in URL
GET /api/vedtak/hentAlle # Verb in URL
POST /api/createVedtak # Verb in URL
GET /api/Vedtak # PascalCaseError Handling (RFC 7807 / ProblemDetail)
// Spring Boot 3+ — built-in ProblemDetail support
@RestControllerAdvice
class ErrorHandler {
@ExceptionHandler(ResourceNotFoundException::class)
fun handleNotFound(ex: ResourceNotFoundException): ProblemDetail =
ProblemDetail.forStatusAndDetail(HttpStatus.NOT_FOUND, ex.message ?: "Resource not found").apply {
title = "Resource not found"
setProperty("resourceType", ex.resourceType)
setProperty("resourceId", ex.resourceId)
}
@ExceptionHandler(MethodArgumentNotValidException::class)
fun handleValidation(ex: MethodArgumentNotValidException): ProblemDetail =
ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, "Validation failed").apply {
title = "Invalid request"
setProperty("errors", ex.bindingResult.fieldErrors.map {
mapOf("field" to it.field, "message" to it.defaultMessage)
})
}
}For Ktor, use the StatusPages plugin:
install(StatusPages) {
exception<ResourceNotFoundException> { call, cause ->
call.respond(HttpStatusCode.NotFound, ProblemResponse(
title = "Resource not found",
status = 404,
detail = cause.message ?: "Resource not found",
instance = call.request.uri,
))
}
exception<ValidationException> { call, cause ->
call.respond(HttpStatusCode.BadRequest, ProblemResponse(
title = "Invalid request",
status = 400,
detail = "Validation failed",
errors = cause.errors,
))
}
}Response format (RFC 7807):
{
"type": "about:blank",
"title": "Resource not found",
"status": 404,
"detail": "Vedtak with id 123 does not exist",
"instance": "/api/vedtak/123",
"resourceType": "vedtak",
"resourceId": "123"
}Pagination
Use offset-based pagination with consistent parameter names:
@GetMapping("/api/vedtak")
fun list(
@RequestParam(defaultValue = "0") page: Int,
@RequestParam(defaultValue = "20") size: Int,
@RequestParam(defaultValue = "opprettetDato") sort: String,
@RequestParam(defaultValue = "desc") order: String,
): Page<VedtakDTO> {
require(size in 1..100) { "size must be between 1 and 100" }
val pageable = PageRequest.of(page, size, Sort.by(Sort.Direction.fromString(order), sort))
return vedtakService.findAll(pageable)
}Response:
{
"content": [...],
"page": {
"size": 20,
"number": 0,
"totalElements": 142,
"totalPages": 8
}
}Input Validation
data class CreateVedtakRequest(
@field:NotBlank(message = "Title is required")
val tittel: String,
@field:Size(min = 11, max = 11, message = "FNR must be 11 digits")
@field:Pattern(regexp = "\\d{11}", message = "FNR must consist of digits")
val fnr: String,
@field:Positive(message = "Amount must be positive")
val belop: BigDecimal,
@field:NotNull(message = "Start date is required")
val fom: LocalDate,
)HTTP Status Codes
| Code | Usage |
200 OK | Successful GET, PUT, PATCH |
201 Created | Successful POST (new resource) |
204 No Content | Successful DELETE |
400 Bad Request | Invalid input / validation failed |
401 Unauthorized | Missing or invalid token |
403 Forbidden | Valid token, but no access |
404 Not Found | Resource does not exist |
409 Conflict | Duplicate / state conflict |
422 Unprocessable Entity | Semantic error (valid format, wrong content) |
500 Internal Server Error | Unexpected server error |
OpenAPI / Swagger
// Spring Boot + springdoc-openapi
@Operation(
summary = "Hent vedtak",
description = "Henter vedtak basert på ID",
responses = [
ApiResponse(responseCode = "200", description = "Vedtak funnet"),
ApiResponse(responseCode = "404", description = "Vedtak ikke funnet"),
]
)
@GetMapping("/{id}")
fun getById(@PathVariable id: UUID): ResponseEntity<VedtakDTO>Versioning
Use URL-based versioning when breaking changes are necessary:
// v1 — original
@RestController
@RequestMapping("/api/v1/vedtak")
class VedtakV1Controller
// v2 — ny kontrakt
@RestController
@RequestMapping("/api/v2/vedtak")
class VedtakV2ControllerAlternatively, avoid versioning by:
- Only adding new fields (never removing)
- Making new fields optional
- Deprecating fields with
@Deprecatedbefore removal
Rules
- Use nouns in URLs, not verbs
- Use kebab-case for multi-word URL segments:
/api/vedtak-perioder - Use camelCase for JSON fields:
opprettetDato,brukerId - Always return ProblemDetail on errors (not plain text)
- Validate input at controller level with
@Valid - Never log PII in request/response — log correlation ID
- Set
Content-Type: application/jsonon all responses
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

