Skip to content

oil-oil/see-skill / see

使用外部视觉服务或本地 OCR 分析本地图片、截图、视频及明确提供的媒体 URL,输出 Markdown。用户明确要求 see,或当前主模型缺少完成媒体分析所需的视觉能力时使用。不拦截普通文本、任意 URL 或已有原生视觉可以直接完成的任务;不用于生图、编辑图片或自动操作屏幕。使用外部服务前说明发送的媒体与服务范围,无法识别时如实说明限制。

FileKindSize
SKILL.mdskill md4.8 KB
agents/openai.yamlconfig368 B
references/api-key-setup.mdmarkdown4.0 KB
scripts/credential-ui/README.mdmarkdown8.0 KB
scripts/credential-ui/component.jsonconfig2.2 KB
scripts/credential-ui/manifests/bailian.jsonconfig227 B
scripts/credential-ui/manifests/default.jsonconfig226 B
scripts/credential-ui/manifests/openrouter.jsonconfig230 B
scripts/credential-ui/manifests/profiles.jsonconfig494 B
scripts/credential-ui/manifests/tokendance.jsonconfig230 B
scripts/credential-ui/package-lock.jsonmanifest8.5 KB
scripts/credential-ui/package.jsonmanifest656 B
scripts/credential-ui/public/app.jsscript6.3 KB
scripts/credential-ui/public/favicon.svgother315 B
scripts/credential-ui/public/index.htmlother1.2 KB
scripts/credential-ui/public/style.cssother3.1 KB
scripts/credential-ui/src/cli.tsscript6.3 KB
scripts/credential-ui/src/config.tsscript5.7 KB
scripts/credential-ui/src/page.tsscript1.7 KB
scripts/credential-ui/src/profile.tsscript4.7 KB
scripts/credential-ui/src/run.tsscript3.3 KB
scripts/credential-ui/src/server.tsscript11.3 KB
scripts/credential-ui/tests/configure.test.tsscript2.5 KB
scripts/credential-ui/tests/credentials.test.tsscript6.4 KB
scripts/credential-ui/tests/multi-key.test.tsscript9.7 KB
scripts/credential-ui/tests/native-smoke.tsscript4.1 KB
scripts/credential-ui/tests/page.test.tsscript2.0 KB
scripts/credential-ui/tests/profile.test.tsscript4.1 KB
scripts/credential-ui/tests/run.test.tsscript2.7 KB
scripts/credential-ui/tests/ui.test.tsscript5.0 KB
scripts/credential-ui/tsconfig.jsonconfig353 B
scripts/credential-ui/tsconfig.web.jsonconfig237 B
scripts/credential-ui/web/app.tsscript6.3 KB
scripts/ocr_macos.jsscript2.5 KB
scripts/ocr_macos.swiftscript5.7 KB
scripts/ocr_windows.ps1script3.3 KB
scripts/onboard.pyexecutablescript12.0 KB
scripts/parse_media.pyexecutablescript47.0 KB
scripts/requirements-credentials.txtmarkdown73 B
scripts/secure_credentials.pyscript1.8 KB
scripts/see.shexecutablescript146 B

scripts/credential-ui/tests/credentials.test.ts

View on GitHub
import assert from 'node:assert/strict';
import { test } from 'node:test';
import { request as httpRequest } from 'node:http';
import { fileURLToPath } from 'node:url';
import { readFile } from 'node:fs/promises';
import { createStore, loadManifest, type CredentialBackend } from '../src/config.ts';
import { startServer } from '../src/server.ts';

const manifest = await loadManifest(fileURLToPath(new URL('../manifests/default.json', import.meta.url)));
const fake = 'TEST_ONLY_NOT_A_REAL_SECRET_12345';
test('通用页面默认使用中性色,不引入未经配置的品牌色', async () => {
  const css = await readFile(new URL('../public/style.css', import.meta.url), 'utf8');
  for (const match of css.matchAll(/#([0-9a-f]{6})(?:[0-9a-f]{2})?\b/gi)) {
    const color = match[1];
    assert.equal(color.slice(0, 2), color.slice(2, 4));
    assert.equal(color.slice(2, 4), color.slice(4, 6));
  }
});
function memory(initial?: string) {
  let value = initial;
  let writes = 0;
  const backend: CredentialBackend = { name: '测试凭据库', get: async () => value,
    set: async v => { value = v; writes++; }, delete: async () => { value = undefined; } };
  return { backend, value: () => value, writes: () => writes };
}
test('首次保存只写入凭据后端;状态与结果不包含密钥', async () => {
  const m = memory();
  const store = createStore(manifest, m.backend);
  const before = await store.status();
  assert.equal(before.configured, false);
  const saved = await store.save({ revision: before.revision, value: fake });
  assert.equal(m.value(), fake);
  const after = await store.status();
  assert.equal(after.configured, true);
  assert.equal(JSON.stringify({ saved, after }).includes(fake), false);
  assert.equal('target' in after, false);
});
test('已有值需要确认替换,旧版本请求不能覆盖新值', async () => {
  const m = memory('TEST_OLD');
  const store = createStore(manifest, m.backend);
  const before = await store.status();
  await assert.rejects(store.save({ revision: before.revision, value: fake }), /确认替换/);
  assert.equal(m.writes(), 0);
  await store.save({ revision: before.revision, value: fake, replaceExisting: true });
  await assert.rejects(store.save({ revision: before.revision, value: 'TEST_STALE', replaceExisting: true }), /发生变化/);
  assert.equal(m.value(), fake);
});
test('凭据服务不可用时明确失败,不回退文件,不泄漏底层错误', async () => {
  const bad: CredentialBackend = { name: '不可用', get: async () => { throw Error(fake); },
    set: async () => { throw Error(fake); }, delete: async () => {} };
  await assert.rejects(createStore(manifest, bad).status(), e => e instanceof Error && !e.message.includes(fake) && /系统凭据/.test(e.message));
  const m = memory(); m.backend.set = async () => { throw Error(fake); };
  const store = createStore(manifest, m.backend);
  await assert.rejects(store.save({ revision: (await store.status()).revision, value: fake }), e => e instanceof Error && !e.message.includes(fake));
});
test('拒绝路径、旧 JSON 请求、空值、多行及超长密钥', async () => {
  const m = memory(); const store = createStore(manifest, m.backend);
  const revision = (await store.status()).revision;
  for (const input of [{ revision, value: fake, target: '/tmp/unwanted.json' },
    { revision, values: { api_key: fake } }, { revision, value: '' },
    { revision, value: 'one\ntwo' }, { revision, value: 'x'.repeat(2501) }])
    await assert.rejects(store.save(input));
  assert.equal(m.writes(), 0);
});
test('HTTP 认证、Host 和跨站保护、脱敏及默认单字段占位框', async t => {
  const m = memory(); const emitted: object[] = [];
  const app = await startServer({ manifest, backend: m.backend, onComplete: v => emitted.push(v) });
  t.after(app.close);
  assert.equal((await fetch(app.origin + '/api/meta')).status, 401);
  const wrongHost = await new Promise<number | undefined>((resolve, reject) => {
    const req = httpRequest(app.origin, { headers: { Host: 'attacker.example' } }, res => { res.resume(); resolve(res.statusCode); });
    req.on('error', reject); req.end();
  });
  assert.equal(wrongHost, 403);
  const html = await fetch(app.origin);
  assert.match(html.headers.get('Content-Security-Policy')!, /frame-ancestors 'none'/);
  assert.equal((await html.text()).match(/<input\b/g)?.length, 1);
  const headers: Record<string, string> = { Origin: app.origin, 'X-Local-Request': '1', 'Content-Type': 'application/json', Authorization: 'Bearer ' + app.bootstrap };
  const auth = await fetch(app.origin + '/api/session', { method: 'POST', headers, body: '{}' });
  assert.equal(auth.status, 200); headers.Cookie = auth.headers.get('set-cookie')!.split(';')[0];
  const meta = await (await fetch(app.origin + '/api/meta', { headers })).json();
  assert.equal(meta.label, manifest.label);
  assert.deepEqual(meta.ui, manifest.ui);
  const payload = { revision: meta.revision, value: fake };
  const post = (extras: Record<string, string>) => fetch(app.origin + '/api/save', { method: 'POST', headers: { ...headers, ...extras }, body: JSON.stringify(payload) });
  assert.equal((await post({ Origin: 'https://attacker.example' })).status, 403);
  assert.equal((await post({ 'X-Local-Request': '' })).status, 403);
  const result = await post({}); assert.equal(result.status, 200);
  const visible = [await result.text(), JSON.stringify(emitted)];
  visible.push(await (await fetch(app.origin + '/api/meta', { headers })).text());
  const agent = await (await fetch(app.origin + '/agent/status', { headers })).json();
  assert.equal(agent.status, 'saved'); visible.push(JSON.stringify(agent));
  assert.equal(visible.some(v => v.includes(fake)), false);
  assert.equal((await post({})).status, 409); assert.equal(m.writes(), 1);
});
test('取消不写凭据,取消后不能再保存', async t => {
  const m = memory(); const app = await startServer({ manifest, backend: m.backend }); t.after(app.close);
  const headers: Record<string, string> = { Origin: app.origin, 'X-Local-Request': '1', 'Content-Type': 'application/json', Authorization: 'Bearer ' + app.bootstrap };
  const auth = await fetch(app.origin + '/api/session', { method: 'POST', headers, body: '{}' });
  headers.Cookie = auth.headers.get('set-cookie')!.split(';')[0];
  assert.equal((await fetch(app.origin + '/api/cancel', { method: 'POST', headers, body: '{}' })).status, 200);
  assert.equal((await fetch(app.origin + '/api/save', { method: 'POST', headers, body: '{}' })).status, 409);
  assert.equal(m.writes(), 0);
});
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall