ソース情報
- リポジトリ
- caffeinelabs/skills
- ソースの最終更新活動
- 2026年4月20日 13:53
- 検出された SKILL.md の言語
- 英語
- スター
- 0
- フォーク
- 1
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
SOC 職業分類に基づく
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/caffeinelabs/skills --skill extension-qr-codeコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
MANDATORY recipe for every Caffeine build that calls an LLM, chatbot, GPT, or ChatGPT **on Caffeine Inference** (no user-pasted OpenAI key). The ONLY supported path is the `caffeineai-inference-client` mops package with `Config.fromEnv<system>()`, which hands the canister a ready-to-use authenticated config — the app never asks for, stores, or returns a key. Hand-rolling `ic.http_request` to `inference.caffeine.ai` (or `api.openai.com`) is a FORBIDDEN anti-pattern. Load this skill whenever the user, spec, or any prior task wants an LLM in a Caffeine app — and BEFORE writing any code that talks to an LLM host. Use `extension-openai` only when the spec explicitly requires a user- or admin-pasted `sk-...` key against `api.openai.com`.
MANDATORY recipe for every Caffeine build that calls OpenAI (ChatGPT, GPT-4o, an LLM, a chatbot, embeddings). The ONLY supported path is the `openai-client` mops package with a canister-side API-key bearer. Hand-rolling `ic.http_request` to `api.openai.com/v1/...` is a FORBIDDEN anti-pattern — it leaks the bearer across replicated outcalls (security + 13× billing impact), bypasses the typed request/response bindings, and forces hand-rolled JSON on a language with poor JSON support. Load this skill whenever the user, spec, or any prior task mentions ChatGPT, GPT (any version), OpenAI, an LLM, a chatbot, or embeddings — and BEFORE writing any code that touches `api.openai.com`.
EXPERIMENTAL, UNTESTED recipe for posting messages to a Slack workspace from a Caffeine canister via the `slack-client` mops package (Slack Web API). Use it when the user wants their app to send a message to a Slack channel — "post to Slack", "notify a channel", "send a Slack message", or equivalent. The client is a pre-release 0.1.0 drop (bot `xoxb-` or user `xoxp-` token): its request path is verified against the live Slack API (a real message posts), but the success-response decode is not yet runtime-confirmed, so treat it as a starting point and do NOT present Slack as a fully supported platform feature yet. Hand-rolling `ic.http_request` calls to `slack.com/api` is still the wrong move — prefer the generated client so bearer auth, percent-encoding, and JSON parsing come for free.
| name | extension-qr-code |
| description | QR code scanner using the camera. |
| version | 0.1.4 |
| compatibility | {"npm":{"@caffeineai/qr-code":"~0.1.1","@caffeineai/camera":"~0.1.1"}} |
| caffeineai-subscription | ["none"] |
QR code scanner extension for Caffeine AI.
This skill adds QR code scanning using the device camera. Built on top of the camera component with jsQR for decoding.
For QR code scanner support:
There is a prefabricated React hook imported from @caffeinelabs/qr-code that cannot be modified.
import { RefObject } from 'react';
import { CameraConfig, CameraError } from '@caffeineai/camera';
export interface QRResult {
// The decoded QR code data
data: string;
// Timestamp when the QR code was scanned
timestamp: number;
}
export interface QRScannerConfig extends CameraConfig {
// How often to scan for QR codes in milliseconds (default: 100)
scanInterval?: number;
// Maximum number of results to keep in history (default: 10)
maxResults?: number;
// URL to load jsQR library from (default: jsdelivr CDN)
jsQRUrl?: string;
}
export interface UseQRScannerReturn {
// Array of scanned QR codes (newest first)
qrResults: QRResult[];
// Whether currently scanning for QR codes
isScanning: boolean;
// Whether jsQR library has been loaded
jsQRLoaded: boolean;
// Camera state (pass-through from useCamera)
isActive: boolean;
isSupported: boolean | null;
error: CameraError | null;
isLoading: boolean;
currentFacingMode: 'user' | 'environment';
// Start camera and begin scanning - returns true on success
startScanning: () => Promise<boolean>;
// Stop scanning and camera
stopScanning: () => Promise<void>;
// Switch camera facing mode - returns true on success
switchCamera: () => Promise<boolean>;
// Clear all scan results
clearResults: () => void;
// Reset scanner state (stop scanning and clear results)
reset: () => void;
// Retry camera initialization after error - returns true on success
retry: () => Promise<boolean>;
// Ref to attach to video element for camera preview
videoRef: RefObject<HTMLVideoElement>;
// Ref to attach to canvas element used for QR processing (can be hidden)
canvasRef: RefObject<HTMLCanvasElement>;
// Computed state
// Whether scanner is ready to use (jsQR loaded and camera supported)
isReady: boolean;
// Whether scanning can be started (ready + not loading)
canStartScanning: boolean;
}
export declare function useQRScanner(config?: QRScannerConfig): UseQRScannerReturn;
Usage example:
import { useQRScanner } from '@caffeineai/qr-code';
function QRScannerComponent() {
const {
qrResults,
isScanning,
isActive,
isSupported,
error,
isLoading,
canStartScanning,
startScanning,
stopScanning,
switchCamera,
clearResults,
videoRef,
canvasRef
} = useQRScanner({
facingMode: 'environment',
scanInterval: 100,
maxResults: 5
});
if (isSupported === false) {
return <div>Camera not supported</div>;
}
return (
<div>
<video
ref={videoRef}
style={{ width: '100%', height: 'auto' }}
playsInline
muted
/>
<canvas ref={canvasRef} style={{ display: 'none' }} />
{error && <div>Error: {error.message}</div>}
Start Scanning
Stop Scanning
{/* Only show switch camera on mobile */}
{/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && (
Switch Camera
)}
Results {qrResults.length > 0 && Clear}
{qrResults.map(result => (
{new Date(result.timestamp).toLocaleTimeString()}
{result.data}
))}
);
}
Properly display QR scanner error messages in the app.