Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/caffeinelabs/skills --skill extension-qr-code명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
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.
SOC 직업 분류 기준
SKILL.md 표시 중
| 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.