Phase 4 Api logo

Phase 4 Api

Organization
ww-w-ai
phase-4-api

Design and implement backend APIs with Zero Script QA validation. Triggers: API design, REST API, backend, endpoint

Overview

Publisherww-w-ai
Repositorybkit-claude-code
Skill namephase-4-api
Stars
601
Forks
154
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ww-w-ai on GitHub. Read the source before you install it.

Installation

Install the Phase 4 Api AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ww-w-ai/bkit-claude-code.git /tmp/bkit-claude-code
mkdir -p .claude/skills
cp -r /tmp/bkit-claude-code/skills/phase-4-api .claude/skills/phase-4-api
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Phase 4 Api in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Phase 4 Api on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Phase 4 Api is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Phase 4: API Design/Implementation + Zero Script QA

Backend API implementation and script-free QA

Purpose

Implement backend APIs that can store and retrieve data. Validate with structured logs instead of test scripts.

What to Do in This Phase

  1. API Design: Define endpoints, requests/responses
  2. API Implementation: Write actual backend code
  3. Zero Script QA: Log-based validation

Deliverables

docs/02-design/
└── api-spec.md             # API specification

src/api/                    # API implementation
├── routes/
├── controllers/
└── services/

docs/03-analysis/
└── api-qa.md               # QA results

PDCA Application

  • Plan: Define required API list
  • Design: Design endpoints, requests/responses
  • Do: Implement APIs
  • Check: Validate with Zero Script QA
  • Act: Fix bugs and proceed to Phase 5

Level-wise Application

LevelApplication Method
StarterSkip this Phase (no API)
DynamicUse bkend.ai BaaS (see below)
EnterpriseImplement APIs directly

Dynamic Level: bkend.ai BaaS API Implementation

Step 1: MCP Setup
bash
claude mcp add bkend --transport http https://api.bkend.ai/mcp
Step 2: Table Design (via MCP tools)

Natural language request: "Create a users table with name(required), email(required, unique), age fields" -> MCP backend_table_create auto-invoked

Step 3: Service API Integration
MethodEndpointDescription
GET/v1/data/{table}List (filter, sort, page)
POST/v1/data/{table}Create data
GET/v1/data/{table}/{id}Get single
PATCH/v1/data/{table}/{id}Partial update
DELETE/v1/data/{table}/{id}Delete

Required Headers: x-project-id, x-environment, Authorization

Step 4: Auth Implementation

Reference MCP tools 3_howto_implement_auth and 6_code_examples_auth

Step 5: Zero Script QA
  • Check bkend REST API call logs in browser DevTools Network tab
  • Verify API behavior via response code/body

What is Zero Script QA?

Instead of writing test scripts, validate with structured debug logs

[API] POST /api/users
[INPUT] { "email": "test@test.com", "name": "Test" }
[PROCESS] Email duplicate check → Passed
[PROCESS] Password hash → Complete
[PROCESS] DB save → Success
[OUTPUT] { "id": 1, "email": "test@test.com" }
[RESULT] ✅ Success

Advantages:
- Save test code writing time
- See actual behavior with your eyes
- Easy debugging

RESTful API Principles

What is REST?

REpresentational State Transfer - an architecture style for designing web services.

6 Core Principles

PrincipleDescriptionExample
1. Client-ServerSeparation of concerns between client and serverUI ↔ Data storage separated
2. StatelessEach request is independent, server doesn't store client stateAuth token included with each request
3. CacheableResponses must indicate if cacheableCache-Control header
4. Uniform InterfaceInteract through consistent interfaceDetailed below
5. Layered SystemAllow layered system architectureLoad balancer, proxy
6. Code on Demand(Optional) Server can send code to clientJavaScript delivery

Uniform Interface Details

The core of RESTful APIs is a uniform interface.

1. Resource-Based URLs
✅ Good (nouns, plural)
GET    /users          # User list
GET    /users/123      # Specific user
POST   /users          # Create user
PUT    /users/123      # Update user
DELETE /users/123      # Delete user

❌ Bad (using verbs)
GET    /getUsers
POST   /createUser
POST   /deleteUser/123
2. HTTP Method Meanings
MethodPurposeIdempotentSafe
GETRead
POSTCreate
PUTFull update
PATCHPartial update
DELETEDelete

Idempotent: Same result even if requested multiple times Safe: Doesn't change server state

3. HTTP Status Codes
2xx Success
├── 200 OK              # Success (read, update)
├── 201 Created         # Creation success
└── 204 No Content      # Success but no response body (delete)

4xx Client Error
├── 400 Bad Request     # Invalid request (validation failure)
├── 401 Unauthorized    # Authentication required
├── 403 Forbidden       # No permission
├── 404 Not Found       # Resource not found
└── 409 Conflict        # Conflict (duplicate, etc.)

5xx Server Error
├── 500 Internal Error  # Internal server error
└── 503 Service Unavailable  # Service unavailable
4. Consistent Response Format
json
// Success response
{
  "data": {
    "id": 123,
    "email": "user@example.com",
    "name": "John Doe"
  },
  "meta": {
    "timestamp": "2026-01-08T10:00:00Z"
  }
}

// Error response
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Email format is invalid.",
    "details": [
      { "field": "email", "message": "Please enter a valid email" }
    ]
  }
}

// List response (pagination)
{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 100,
    "totalPages": 5
  }
}

URL Design Rules

1. Use lowercase
   ✅ /users/123/orders
   ❌ /Users/123/Orders

2. Use hyphens (-), avoid underscores (_)
   ✅ /user-profiles
   ❌ /user_profiles

3. Express hierarchical relationships
   ✅ /users/123/orders/456

4. Filtering via query parameters
   ✅ /users?status=active&sort=created_at
   ❌ /users/active/sort/created_at

5. Version management
   ✅ /api/v1/users
   ✅ Header: Accept: application/vnd.api+json;version=1

API Documentation Tools

ToolFeatures
OpenAPI (Swagger)Industry standard, auto documentation
PostmanTesting + documentation
InsomniaLightweight API client

API Design Checklist

  • RESTful Principles Compliance
    • Resource-based URLs (nouns, plural)
    • Appropriate HTTP methods
    • Correct status codes
  • Unified error response format
  • Authentication/authorization method defined
  • Pagination method defined
  • Versioning method (optional)

Templates

  • templates/pipeline/phase-4-api.template.md
  • templates/pipeline/zero-script-qa.template.md

Next Phase

Phase 5: Design System → APIs are ready, now build UI components

Frequently asked questions

What does the Phase 4 Api AI skill do?

Design and implement backend APIs with Zero Script QA validation. Triggers: API design, REST API, backend, endpoint

Why use Phase 4 Api on TypingMind?

Because you install it once and use it with any model. Phase 4 Api is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Phase 4 Api in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ww-w-ai/bkit-claude-code/tree/main/skills/phase-4-api. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Phase 4 Api?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Phase 4 Api?

As many as you like. As long as a model supports skills, you can use Phase 4 Api with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Phase 4 Api AI skill free?

Yes. It is published on GitHub by ww-w-ai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇