Back to list
paralect

hive-service

by paralect

0🍴 0📅 Jan 18, 2026

SKILL.md


name: hive-service description: How to create external services in Hive framework globs:

  • src/services/*.js alwaysApply: false

Services

Services wrap external APIs and utilities.

Location: /src/services/{name}.js

API Client Template

import config from 'app-config';
import axios from 'axios';

const client = axios.create({
  baseURL: 'https://api.example.com',
  headers: {
    Authorization: `Bearer ${config.example.apiKey}`,
  },
});

export default {
  getItems: async (params) => {
    const response = await client.get('/items', { params });
    return response.data;
  },
  
  createItem: async (data) => {
    const response = await client.post('/items', data);
    return response.data;
  },
};

SDK Wrapper Template

import config from 'app-config';
import { WebClient } from '@slack/web-api';

const client = new WebClient(config.slack.botToken);

export default {
  client,
  
  postMessage: async ({ channel, text }) => {
    return client.chat.postMessage({ channel, text });
  },
};

Utility Service Template

import _ from 'lodash';

export const when = (condition, result, elseResult = {}) => {
  if (_.isUndefined(condition)) return {};
  if (!condition) return elseResult;
  return _.isFunction(result) ? result() : result;
};

export const base64 = {
  encode: (obj) => Buffer.from(JSON.stringify(obj)).toString('base64'),
  decode: (str) => JSON.parse(Buffer.from(str, 'base64').toString()),
};

Using Services

import harvest from 'services/harvest';
import slackService from 'services/slack';
import { when } from 'services/utils';

// API calls
const invoices = await harvest.getInvoices({ projectId });

// SDK usage
await slackService.postMessage({ channel: '#general', text: 'Hello' });

// Utilities
const query = { ...when(status, { status }) };

Score

Total Score

50/100

Based on repository quality metrics

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

Reviews

💬

Reviews coming soon