global-think-tank-analyst
Strategic-risk analysis skill for AI agents producing decision-ready memos on geopolitics, sanctions, trade, regulation, and strategic risk with explicit evidence boundaries, uncertainty, scenarios, actor incentives, trade-offs, and watch-next indicators. Use for a country risk brief, policy memo, sanctions or export-control exposure assessment, trade or regulatory implications memo, geopolitical scenario brief, strategic implications note for leadership, stakeholder and incentives analysis, a red-team challenge to an existing policy or risk view, or a decision briefing pack for founders, operators, investors, NGOs, compliance teams, policy teams, or leadership. Do not use for a simple news recap, encyclopedia-style overview, academic literature review, legal advice, intelligence-style certainty, decorative analysis, or unsupported quantitative forecasting.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 7
- Forks
- 2
01 前言 Front Matter
- name
- fastapi-uploadstream-binary-upload
- description
- Guide for handling HTTP uploads of binary data in FastAPI using fastapi_uploadstream. Use when users ask about how to upload raw http bodies to a fastapi app without multipart encoding. Describes StreamBody, UploadStream, content-type validation, chunked reads, or OpenAPI binary requestBody setup.
- argument-hint
- endpoint shape, accepted media types, and whether OpenAPI docs are needed
- user-invocable
- true
02 资源文件 290
- 参考文档.claude-plugin/plugin.json602 B
- 其他.dockerignore87 B
- 其他.editorconfig147 B
- 参考文档.github/ISSUE_TEMPLATE/bug_report.md230 B
- 参考文档.github/ISSUE_TEMPLATE/feature_request.md249 B
- 参考文档.github/policy-risk-signal/sources.json2.0 KB
- 参考文档.github/pull_request_template.md795 B
- 资产文件.github/social-preview.png28.2 KB
- 参考文档.github/workflows/ci.yml2.9 KB
- 参考文档.github/workflows/docs.yml1.1 KB
- 参考文档.github/workflows/eval.yml1.4 KB
- 参考文档.github/workflows/policy-risk-signal.yml2.2 KB
- 参考文档.github/workflows/publish-pypi.yml3.6 KB
- 其他.gitignore298 B
- 参考文档AGENTS.md9.6 KB
- 参考文档CHANGELOG.md31.6 KB
- 参考文档CLAUDE.md1.7 KB
- 参考文档CODE_OF_CONDUCT.md404 B
- 参考文档CONTEXT.md5.7 KB
- 参考文档CONTRIBUTING.md8.2 KB
- 参考文档docker-compose.yml561 B
- 其他Dockerfile580 B
- 参考文档docs/adr/0001-use-evidence-packet-handoff-as-primary-agenda-seam.md1.2 KB
- 参考文档docs/analysis-contract.md5.9 KB
- 参考文档docs/case-packet.brief.json4.0 KB
- 参考文档docs/case-packet.evidence.json9.1 KB
- 参考文档docs/case-packet.md17.3 KB
- 参考文档docs/contract-checker.md4.4 KB
- 参考文档docs/contract-release-criteria.md1.6 KB
- 参考文档docs/definition-of-done.md3.5 KB
- 参考文档docs/estimative-language.md2.2 KB
- 参考文档docs/evidence-packet-handoff.md6.6 KB
- 参考文档docs/external-headless-template.md2.5 KB
- 参考文档docs/headless-workflow.md3.4 KB
- 参考文档docs/integrations/agenda-intelligence-md-live-demo.md5.9 KB
- 参考文档docs/integrations/agenda-intelligence-md.md7.8 KB
- 参考文档docs/maturity-framework.md3.0 KB
- 参考文档docs/memo-artifact.md6.4 KB
- 参考文档docs/publishing.md1.8 KB
- 参考文档docs/quantitative-scenario-handoff.md2.9 KB
- 参考文档docs/repo-conventions.md3.0 KB
- 参考文档docs/research-basis.md4.0 KB
- 参考文档docs/review-bundle.md4.6 KB
- 参考文档docs/source-grading.md2.2 KB
- 参考文档docs/source-refresh-2026-07-11.md2.1 KB
- 参考文档evals/adversarial/case-01-prompt-injection-in-source.md3.2 KB
- 参考文档evals/adversarial/case-02-conflicting-dates.md3.1 KB
- 参考文档evals/adversarial/case-03-opinion-as-primary.md3.3 KB
- 参考文档evals/adversarial/README.md2.7 KB
- 参考文档evals/agent-eval/2026-05-20-cbam-enforcement.md11.5 KB
- 参考文档evals/agent-eval/2026-06-30-baltic-cable-attribution-ach.md7.0 KB
- 参考文档evals/agent-eval/2026-07-10-input-claim-accounting-lng-packet.md4.3 KB
- 参考文档evals/agent-eval/artifact-behavior-expectations.json4.1 KB
- 参考文档evals/agent-eval/artifact-eval.md6.4 KB
- 其他evals/agent-eval/benchmark-cases.jsonl4.6 KB
- 参考文档evals/agent-eval/commitments/2026-09-05-artifact-behavior-holdout-v1.json692 B
- 参考文档evals/agent-eval/commitments/README.md1.2 KB
- 参考文档evals/agent-eval/README.md9.9 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/freshness-report.json1.1 KB
- 其他evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/outputs.jsonl111.2 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/private-mapping.json4.5 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/README.md5.7 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/report.json60.8 KB
- 其他evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/requests.jsonl334.9 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/rescore-gtta-method-contract-1.2.1.json60.5 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/rescore-gtta-method-contract-1.2.2.json60.5 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/rescore-gtta-method-contract-1.2.3.json62.2 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/run-metadata.json498 B
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high-seed-20260831/warning-triage-gtta-method-contract-1.2.1.md2.3 KB
- 其他evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/outputs.jsonl122.3 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/private-mapping.json4.5 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/README.md4.6 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/report.json76.6 KB
- 其他evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/requests.jsonl325.0 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/rescore-gtta-method-contract-1.2.0.json62.5 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/rescore-gtta-method-contract-1.2.1.json62.4 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/rescore-gtta-method-contract-1.2.2.json62.4 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/rescore-gtta-method-contract-1.2.3.json64.2 KB
- 参考文档evals/agent-eval/runs/2026-08-30-antigravity-gemini-3.7-flash-high/run-metadata.json590 B
- 参考文档evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/freshness-report.json1.8 KB
- 其他evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/outputs.jsonl248.8 KB
- 参考文档evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/private-mapping.json4.5 KB
- 参考文档evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/README.md6.2 KB
- 参考文档evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/report.json114.1 KB
- 其他evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/requests.jsonl340.1 KB
- 参考文档evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/rescore-gtta-method-contract-1.2.2.json112.0 KB
- 参考文档evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/rescore-gtta-method-contract-1.2.3.json114.3 KB
- 参考文档evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/run-metadata.json636 B
- 参考文档evals/agent-eval/runs/2026-08-31-antigravity-claude-opus-4.6-thinking-seed-20260901/warning-triage-gtta-method-contract-1.2.1.md3.0 KB
- 参考文档evals/agent-eval/runs/2026-09-01-antigravity-claude-opus-4.6-thinking-seed-20260902/freshness-report.json2.4 KB
- 其他evals/agent-eval/runs/2026-09-01-antigravity-claude-opus-4.6-thinking-seed-20260902/outputs.jsonl237.9 KB
- 参考文档evals/agent-eval/runs/2026-09-01-antigravity-claude-opus-4.6-thinking-seed-20260902/private-mapping.json4.5 KB
- 参考文档evals/agent-eval/runs/2026-09-01-antigravity-claude-opus-4.6-thinking-seed-20260902/README.md4.3 KB
- 参考文档evals/agent-eval/runs/2026-09-01-antigravity-claude-opus-4.6-thinking-seed-20260902/report.json100.3 KB
- 其他evals/agent-eval/runs/2026-09-01-antigravity-claude-opus-4.6-thinking-seed-20260902/requests.jsonl345.2 KB
- 参考文档evals/agent-eval/runs/2026-09-01-antigravity-claude-opus-4.6-thinking-seed-20260902/rescore-gtta-method-contract-1.2.3.json102.6 KB
- 参考文档evals/agent-eval/runs/2026-09-01-antigravity-claude-opus-4.6-thinking-seed-20260902/run-metadata.json647 B
- 参考文档evals/agent-eval/runs/2026-09-01-antigravity-claude-opus-4.6-thinking-seed-20260902/warning-triage.md2.7 KB
- 参考文档evals/agent-eval/runs/2026-09-02-antigravity-gemini-3.7-flash-high-artifact-seed-20260903/failure-triage.md1.5 KB
- 其他evals/agent-eval/runs/2026-09-02-antigravity-gemini-3.7-flash-high-artifact-seed-20260903/outputs.jsonl283.4 KB
- 参考文档evals/agent-eval/runs/2026-09-02-antigravity-gemini-3.7-flash-high-artifact-seed-20260903/private-mapping.json4.8 KB
- 参考文档evals/agent-eval/runs/2026-09-02-antigravity-gemini-3.7-flash-high-artifact-seed-20260903/README.md2.3 KB
- 参考文档evals/agent-eval/runs/2026-09-02-antigravity-gemini-3.7-flash-high-artifact-seed-20260903/report.json13.8 KB
- 其他evals/agent-eval/runs/2026-09-02-antigravity-gemini-3.7-flash-high-artifact-seed-20260903/requests.jsonl503.8 KB
- 参考文档evals/agent-eval/runs/2026-09-02-antigravity-gemini-3.7-flash-high-artifact-seed-20260903/run-metadata.json535 B
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-behavior-v1-seed-20260905/freshness-report.json1.9 KB
- 其他evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-behavior-v1-seed-20260905/outputs.jsonl256.7 KB
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-behavior-v1-seed-20260905/private-mapping.json16.3 KB
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-behavior-v1-seed-20260905/README.md3.4 KB
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-behavior-v1-seed-20260905/report.json18.3 KB
- 其他evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-behavior-v1-seed-20260905/requests.jsonl519.5 KB
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-behavior-v1-seed-20260905/run-metadata.json544 B
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-v1.1-seed-20260904/freshness-report.json1.2 KB
- 其他evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-v1.1-seed-20260904/outputs.jsonl273.4 KB
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-v1.1-seed-20260904/private-mapping.json4.8 KB
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-v1.1-seed-20260904/README.md2.5 KB
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-v1.1-seed-20260904/report.json13.6 KB
- 其他evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-v1.1-seed-20260904/requests.jsonl519.5 KB
- 参考文档evals/agent-eval/runs/2026-09-04-antigravity-gemini-3.7-flash-high-artifact-v1.1-seed-20260904/run-metadata.json535 B
- 参考文档evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/execution-audit.md1.7 KB
- 其他evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/holdout-cases.jsonl5.0 KB
- 参考文档evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/holdout-expectations.json3.4 KB
- 其他evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/outputs.jsonl281.9 KB
- 参考文档evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/private-mapping.json13.7 KB
- 参考文档evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/README.md4.5 KB
- 参考文档evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/report.json17.2 KB
- 其他evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/requests.jsonl435.1 KB
- 参考文档evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/run-metadata.json597 B
- 参考文档evals/agent-eval/runs/2026-09-05-antigravity-gemini-3.8-flash-high-artifact-behavior-holdout-v1-seed-20260907/suite-commitment.json692 B
- 参考文档evals/agent-eval/runs/2026-09-05-claude-code-opus-4.6-thinking-artifact-behavior-seed-20260906/freshness-report.json5.0 KB
- 其他evals/agent-eval/runs/2026-09-05-claude-code-opus-4.6-thinking-artifact-behavior-seed-20260906/outputs.jsonl399.3 KB
- 参考文档evals/agent-eval/runs/2026-09-05-claude-code-opus-4.6-thinking-artifact-behavior-seed-20260906/private-mapping.json16.3 KB
- 参考文档evals/agent-eval/runs/2026-09-05-claude-code-opus-4.6-thinking-artifact-behavior-seed-20260906/README.md3.8 KB
- 参考文档evals/agent-eval/runs/2026-09-05-claude-code-opus-4.6-thinking-artifact-behavior-seed-20260906/report.json22.3 KB
- 其他evals/agent-eval/runs/2026-09-05-claude-code-opus-4.6-thinking-artifact-behavior-seed-20260906/requests.jsonl519.5 KB
- 参考文档evals/agent-eval/runs/2026-09-05-claude-code-opus-4.6-thinking-artifact-behavior-seed-20260906/run-metadata.json722 B
- 参考文档evals/checklist.md6.1 KB
- 参考文档evals/failure-modes.md15.7 KB
- 参考文档evals/promptfooconfig.yaml1018 B
- 参考文档evals/prompts/analyst-request.md265 B
- 参考文档evals/README.md1.6 KB
- 参考文档evals/rubric.md3.5 KB
- 参考文档evals/self-critique-draft.md8.3 KB
- 参考文档evals/self-runs/2026-05-18-case-01-prompt-injection.md9.5 KB
- 参考文档evals/self-runs/2026-05-18-fm-validation.md7.4 KB
- 参考文档evals/self-runs/2026-07-06-fm-repro.md5.1 KB
- 参考文档evals/self-runs/2026-07-10-input-claim-accounting-repro.md4.3 KB
- 参考文档evals/self-runs/README.md2.3 KB
- 其他evals/skill-improvement/ach-development/cases.jsonl5.8 KB
- 参考文档evals/skill-improvement/ach-development/README.md2.4 KB
- 其他evals/skill-improvement/cases/global-think-tank-analyst.jsonl9.0 KB
- 参考文档evals/skill-improvement/compact-candidate.md5.9 KB
- 其他evals/skill-improvement/mode-development/cases.jsonl7.8 KB
- 参考文档evals/skill-improvement/mode-development/README.md3.8 KB
- 参考文档evals/skill-improvement/README.md2.3 KB
- 参考文档evals/skill-improvement/rubric.md2.5 KB
- 参考文档evals/skill-improvement/runs/global-think-tank-after-codex-trust-sync.md2.7 KB
- 参考文档evals/skill-improvement/runs/global-think-tank-baseline.md2.8 KB
- 脚本evals/skill-improvement/tools/validate_cases.py3.3 KB
- 其他evals/skill-improvement/verification-development/cases.jsonl4.5 KB
- 参考文档evals/skill-improvement/verification-development/expectations.json4.0 KB
- 参考文档evals/skill-improvement/verification-development/README.md2.3 KB
- 参考文档examples/agenda-projections/live-source-backed-memo.brief.json2.9 KB
- 参考文档examples/agenda-projections/live-source-backed-memo.evidence.json5.1 KB
- 参考文档examples/ai-governance-scenario-brief.md14.4 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/kazakhstan-crma-flagship/memo.json12.3 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/kazakhstan-crma-flagship/memo.sources.json1018 B
- 参考文档examples/cookbooks/flagship-portfolio/cases/kazakhstan-crma-flagship/sources/ec-kazakhstan-mou.txt1.3 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/kazakhstan-crma-flagship/sources/ec-non-eu-projects.txt749 B
- 参考文档examples/cookbooks/flagship-portfolio/cases/kazakhstan-crma-flagship/sources/eurlex-crma.txt1.9 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/kazakhstan-crma-flagship/sources/eurlex-strategic-projects.txt884 B
- 参考文档examples/cookbooks/flagship-portfolio/cases/middle-corridor-sanctions-flagship/memo.json16.0 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/middle-corridor-sanctions-flagship/memo.sources.json1.7 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/middle-corridor-sanctions-flagship/sources/ec-21st-package.txt1.4 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/middle-corridor-sanctions-flagship/sources/ec-chpi.txt1.2 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/middle-corridor-sanctions-flagship/sources/ec-due-diligence.txt2.1 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/middle-corridor-sanctions-flagship/sources/eurlex-833.txt2.1 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/middle-corridor-sanctions-flagship/sources/kazakhstan-specific-goods-law.txt1.9 KB
- 参考文档examples/cookbooks/flagship-portfolio/cases/middle-corridor-sanctions-flagship/sources/world-bank-middle-corridor.txt1.2 KB
- 参考文档examples/cookbooks/flagship-portfolio/README.md1.6 KB
- 脚本examples/cookbooks/flagship-portfolio/run.py5.8 KB
- 参考文档examples/cookbooks/secondary-sanctions/memo.json3.0 KB
- 参考文档examples/cookbooks/secondary-sanctions/memo.sources.json630 B
- 参考文档examples/cookbooks/secondary-sanctions/README.md2.6 KB
- 脚本examples/cookbooks/secondary-sanctions/run.py712 B
- 参考文档examples/cookbooks/secondary-sanctions/sources/synthetic-policy-note.txt248 B
- 参考文档examples/cookbooks/secondary-sanctions/sources/synthetic-shipping-record.txt236 B
- 参考文档examples/critical-minerals-memo.md5.0 KB
- 参考文档examples/energy-transition-policy-memo.md5.3 KB
- 参考文档examples/evidence-packet-handoff.json952 B
- 参考文档examples/export-controls-memo.md4.5 KB
- 参考文档examples/geopolitical-scenario-brief.md3.6 KB
- 参考文档examples/live-source-backed-cbam-enforcement.md10.8 KB
- 参考文档examples/live-source-backed-china-critical-minerals-suspension.md11.9 KB
- 参考文档examples/live-source-backed-ecb-rate-hold.md9.9 KB
- 参考文档examples/live-source-backed-eu-ai-act-simplification.md10.4 KB
- 参考文档examples/live-source-backed-hormuz-energy-prices.md10.4 KB
- 参考文档examples/live-source-backed-memo.md9.6 KB
- 参考文档examples/mixed-mode-middle-corridor-logistics-risk.md6.4 KB
- 参考文档examples/README.md6.0 KB
- 参考文档examples/red-team-policy-brief.md3.8 KB
- 参考文档examples/regulatory-impact-memo.md3.1 KB
- 参考文档examples/sanctions-exposure-memo.md4.2 KB
- 参考文档examples/source-conflict-iea-opec-demand-forecast.md9.5 KB
- 参考文档examples/user-provided-sources-supply-chain-sanctions.md15.9 KB
- 资产文件forecasts/log.csv5.3 KB
- 参考文档forecasts/README.md2.5 KB
- 脚本forecasts/score.py2.8 KB
- 许可证LICENSE1.0 KB
- 参考文档llms.txt5.2 KB
- 参考文档mkdocs.yml1.1 KB
- 参考文档plugin.json782 B
- 参考文档PORTFOLIO.md5.8 KB
- 其他pyproject.toml1.3 KB
- 参考文档README.md9.7 KB
- 参考文档references/examples.md1.7 KB
- 参考文档reviews/README.md1.7 KB
- 参考文档reviews/TEMPLATE.md1.7 KB
- 脚本scripts/agent_eval.py63.4 KB
- 脚本scripts/build_codex.py2.5 KB
- 脚本scripts/build_signals.py708 B
- 脚本scripts/build.py806 B
- 脚本scripts/check_markdown_links.py4.5 KB
- 脚本scripts/check.py2.0 KB
- 脚本scripts/dark_factory_worker.py2.8 KB
- 脚本scripts/generate_policy_risk_signal.py18.0 KB
- 脚本scripts/optimize_prompt_dspy.py3.3 KB
- 脚本scripts/README.md2.3 KB
- 脚本scripts/run_verification_benchmark.py13.0 KB
- 脚本scripts/sync_runtime_resources.py555 B
- 脚本scripts/test_signal_pipeline.py10.7 KB
- 脚本scripts/test_wheel_install.py5.1 KB
- 脚本scripts/validate_codex_sync.py4.0 KB
- 脚本scripts/validate_evidence_packet_handoff.py4.2 KB
- 脚本scripts/validate_examples.py3.1 KB
- 脚本scripts/validate_json.py925 B
- 脚本scripts/validate_language_parity.py3.6 KB
- 脚本scripts/validate_runtime_resources.py1019 B
- 脚本scripts/validate_signals.py5.2 KB
- 脚本scripts/validate_skill_package.py4.3 KB
- 参考文档SECURITY.md795 B
- 参考文档signals/2026/2026-04-28.md2.9 KB
- 参考文档signals/2026/2026-05-08.md4.2 KB
- 参考文档signals/2026/2026-05-09-china-minerals.md5.2 KB
- 参考文档signals/2026/2026-05-09-eu-ai-act.md4.4 KB
- 参考文档signals/2026/2026-05-09-hormuz.md3.6 KB
- 参考文档signals/2026/2026-05-12-fed-stagflation-posture.md7.0 KB
- 参考文档signals/2026/2026-05-12-monetary-policy-divergence.md8.6 KB
- 参考文档signals/2026/2026-05-12-us-china-tariff-de-escalation.md9.4 KB
- 参考文档signals/2026/2026-05-12-us-eu-trade-framework.md6.7 KB
- 参考文档signals/2026/2026-05-17-sovereign-ai-compute.md6.2 KB
- 参考文档signals/2026/2026-05-27-shadow-fleet-insurance.md9.4 KB
- 参考文档signals/2026/2026-06-05-central-asia-reexport-screening.md9.6 KB
- 参考文档signals/2026/2026-06-21-cis-ownership-control-screening.md10.4 KB
- 参考文档signals/feed.json95.0 KB
- 参考文档signals/index.json5.6 KB
- 参考文档signals/latest.md10.7 KB
- 参考文档signals/README.md1.9 KB
- 参考文档signals/TEMPLATE.md2.3 KB
- 参考文档SKILL_RU.md53.1 KB
- 脚本src/gtta/__init__.py2.3 KB
- 脚本src/gtta/agent.py7.9 KB
- 脚本src/gtta/app.py6.0 KB
- 脚本src/gtta/artifact.py18.7 KB
- 脚本src/gtta/cli.py16.0 KB
- 参考文档src/gtta/contracts/gtta.sources-1.0.schema.json2.2 KB
- 脚本src/gtta/db.py1.1 KB
- 脚本src/gtta/discipline.py15.1 KB
- 脚本src/gtta/economics.py3.0 KB
- 脚本src/gtta/knowledge.py5.0 KB
- 脚本src/gtta/langchain.py733 B
- 脚本src/gtta/llamaindex.py1.1 KB
- 脚本src/gtta/mcp_server.py3.1 KB
- 脚本src/gtta/resources.py2.3 KB
- 脚本src/gtta/review.py33.5 KB
- 脚本src/gtta/sarif.py8.8 KB
- 脚本src/gtta/schemas.py2.1 KB
- 脚本src/gtta/server.py5.2 KB
- 脚本src/gtta/verification.py18.4 KB
- 参考文档STATUS.md8.0 KB
- 参考文档templates/memo-blank.md4.8 KB
- 脚本tests/test_agent_eval.py47.1 KB
- 脚本tests/test_artifact.py6.6 KB
- 脚本tests/test_core.py7.9 KB
- 脚本tests/test_discipline.py11.0 KB
- 脚本tests/test_forecasts.py2.4 KB
- 脚本tests/test_review.py11.9 KB
- 脚本tests/test_verification_integration.py3.4 KB
- 脚本tests/test_verification.py13.2 KB
- 参考文档VALIDATION_PLAN.md7.2 KB
03 SKILL.md 正文
FastAPI UploadStream Binary Uploads
Use this skill when you need to implement or explain raw HTTP binary uploads in FastAPI with fastapi_uploadstream.
What This Skill Covers
- Installing and importing the library
- Defining a streaming endpoint with
StreamBody - Reading upload bytes safely with
UploadStream - Restricting accepted
Content-Typevalues - Publishing correct OpenAPI
requestBodyschema for binary bodies
Core Pattern
Use Annotated[UploadStream, StreamBody(...)] on a single endpoint parameter.
Call install_uploadstream_openapi(app) once during app setup.
from typing import Annotated
from fastapi import FastAPI
from fastapi_uploadstream import StreamBody, UploadStream, install_uploadstream_openapi
import hashlib # For demo only - not required.
app = FastAPI()
install_uploadstream_openapi(app)
@app.post("/upload")
async def upload_binary(
body: Annotated[
UploadStream,
StreamBody(
media_types=["application/octet-stream"],
title="Binary upload",
description="Raw binary request body to hash and return metadata",
),
],
):
# Calculate SHA-256 hash of the uploaded data (for demo purposes)
sha256 = hashlib.sha256()
async for chunk in body.iter_chunks():
sha256.update(chunk)
return {
"bytes": body.size,
"content_type": body.content_type,
"filename": body.filename,
"size": body.size,
"sha256": sha256.hexdigest(),
}
Practical Guidance
- Prefer
read(size)oriter_chunks()for large payloads. - Set
media_typesto explicit values likeapplication/octet-streamorimage/*. - Expect HTTP 415 when the request
Content-Typeis not allowed. - Use only one
StreamBody(...)per endpoint. - Do not mix
StreamBodywithBody,Form,File, orUploadFileon the same endpoint.
Streaming Large Files
@app.post("/upload-large")
async def upload_large(
body: Annotated[UploadStream, StreamBody(media_types=["application/octet-stream"])],
):
total = 0
async for chunk in body.iter_chunks(chunk_size=64 * 1024):
total += len(chunk)
# Process each chunk here.
return {"bytes": total}
Ingesting whole file in memory (only small files)
You can also read the entire upload into memory for small files: But beware that this can lead to high memory usage for large uploads, and should be avoided.
@app.post("/upload-small")
async def upload_small(
body: Annotated[UploadStream, StreamBody(media_types=["application/octet-stream"])],
):
total = 0
# watch out! this loads the entire request body!
data = await body.read()
total = len(data)
return {"bytes": total}
Client Example
curl -X POST "http://localhost:8000/upload" \
-H "content-type: application/octet-stream" \
-H "x-filename: payload.bin" \
--data-binary @payload.bin
Request Handling Notes
body.filenamecomes from thex-filenameheader when present.body.sizeis derived fromContent-Lengthwhen available.body.content_typeis the incoming request content type.read(-1)reads all remaining bytes.
More Examples
See reference examples for common endpoint variants.
04 同仓库更多 Skills
global-think-tank-analyst
Strategic-risk analysis skill for AI agents producing decision-ready memos on geopolitics, sanctions, trade, regulation, and strategic risk with explicit evidence boundaries, uncertainty, scenarios, actor incentives, trade-offs, and watch-next indicators. Use for a country risk brief, policy memo, sanctions or export-control exposure assessment, trade or regulatory implications memo, geopolitical scenario brief, strategic implications note for leadership, stakeholder and incentives analysis, a red-team challenge to an existing policy or risk view, or a decision briefing pack for founders, operators, investors, NGOs, compliance teams, policy teams, or leadership. Do not use for a simple news recap, encyclopedia-style overview, academic literature review, legal advice, intelligence-style certainty, decorative analysis, or unsupported quantitative forecasting.
global-think-tank-analyst
暂无简介
policy-risk-memo-architect-codex
Codex-ready strategic-risk analysis skill for AI agents producing decision-ready memos on geopolitics, sanctions, trade, regulation, and strategic risk with explicit evidence boundaries, uncertainty, scenarios, actor incentives, trade-offs, and watch-next indicators. Use for a country risk brief, policy memo, sanctions or export-control exposure assessment, trade or regulatory implications memo, geopolitical scenario brief, strategic implications note for leadership, stakeholder and incentives analysis, a red-team challenge to an existing policy or risk view, or a decision briefing pack for founders, operators, investors, NGOs, compliance teams, policy teams, or leadership. Do not use for a simple news recap, encyclopedia-style overview, academic literature review, legal advice, intelligence-style certainty, decorative analysis, or unsupported quantitative forecasting.