スキル一覧に戻る
Swoking

symfony-skfront-api-service

by Swoking

Claude Code plugin pour projets Symfony StarterKit

0🍴 0📅 2026年1月19日
GitHubで見るManusで実行

SKILL.md


name: symfony-sk:front-api-service description: Create Api services for calling the backend API. Use for HTTP calls to API layer. allowed-tools: Read, Write, Edit, Glob, Grep

Front API Service Skill

Mission

Create API client services that call the backend API.


Location

  • Front: front/src/Service/Api/Api<Feature>.php
  • Back: back/src/Service/Api/Api<Feature>.php

Template

<?php

namespace App\Service\Api;

use StarterKit\Model\ApiResult;
use StarterKit\Service\BaseApiService;

class Api<Feature> extends BaseApiService
{
    public function read(string $lang, string $key): ApiResult
    {
        $this->setGetMethod();
        $this->setSecureByUser();
        $this->setApiRoute($lang."/<feature>/".$key);

        return $this->callApi();
    }

    public function update(string $lang, string $key, array $data): ApiResult
    {
        $this->setPutMethod();
        $this->setSecureByUser();
        $this->callNeedDataInBody();
        $this->setBody($data);
        $this->setApiRoute($lang."/<feature>/".$key);

        return $this->callApi();
    }

    public function delete(string $lang, string $key): ApiResult
    {
        $this->setDeleteMethod();
        $this->setSecureByUser();
        $this->setApiRoute($lang."/<feature>/".$key);

        return $this->callApi();
    }
}

Available Methods

HTTP Methods

  • setGetMethod()
  • setPostMethod()
  • setPutMethod()
  • setDeleteMethod()

Authentication

  • setSecureByUser() - User token
  • setSecureByApiKey() - API key
  • (none) - Public

Request Body

  • callNeedDataInBody() - Required before setBody()
  • setBody(array $data)

Key Rules

  1. Extends BaseApiService
  2. No constructor (parent handles it)
  3. Routes start with $lang."/..."
  4. Call callNeedDataInBody() before setBody()

Checklist

  • Extends BaseApiService
  • $lang is first parameter
  • Routes start with $lang."/..."
  • setSecureByUser() for authenticated endpoints
  • callNeedDataInBody() before setBody()

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です