softinter-chiangrai/up-ai-skill-training

d2-02-api-service

Generates an Angular service that calls the up-api CRUD endpoints for a given entity (getAll, getById, save, update, delete).

First seen Aug 7, 2026

Installation

$ npx skills add softinter-chiangrai/up-ai-skill-training --skill d2-02-api-service

Summary

  • Generates an Angular service that calls the up-api CRUD endpoints for a given entity (getAll, getById, save, update, delete).
  • Use when the user asks for Day 2 step 3 of the CRUD drill, or asks to create the Angular service that talks to up-api.
  • Needs the same entity used on Day 1.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from softinter-chiangrai/up-ai-skill-training · top by installs.

npx skills add softinter-chiangrai/up-ai-skill-training

Browse all from softinter-chiangrai/up-ai-skill-training

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

CompatibilityRequires an existing up-app Angular project (from earlier drill steps) and a running up-api with CRUD endpoints for the target entity.

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,761 B
  • docs SUMMARY.md 306 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 47 installs

SKILL.md

Day 2 · Step 2 — API service

If the entity isn't already established in this conversation, ask which entity (it must match the one exposed by up-api's CRUD endpoints).

up-app/src/app/services/<entity>.service.ts:

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';

export interface <Entity> {
  id?: number;
  // one field per column from the Day 1 entity spec
}

@Injectable({ providedIn: 'root' })
export class <Entity>Service {
  private base = 'http://localhost:8080/api/<entity>s';
  constructor(private http: HttpClient) {}

  getAll(): Observable<<Entity>[]> { return this.http.get<<Entity>[]>(this.base); }
  getById(id: number): Observable<<Entity>> { return this.http.get<<Entity>>(`${this.base}/detail/${id}`); }
  save(item: <Entity>): Observable<<Entity>> { return this.http.post<<Entity>>(`${this.base}/save`, item); }
  update(id: number, item: <Entity>): Observable<<Entity>> { return this.http.put<<Entity>>(`${this.base}/update/${id}`, item); }
  delete(id: number): Observable<void> { return this.http.delete<void>(`${this.base}/${id}`); }
}

Register provideHttpClient() in app.config.ts if it isn't already there. No redeploy needed for this step.