Skip to content
Back to skills

Artifacts

ASecurity

ファイル取込は非同期処理として実装する。APIは受信したファイルをオブジェクトストレージへ保存し、保存先情報をキューへ登録する。ワーカーはキューから保存先情報を取得し、ファイルを読み込んで解析結果をDBへ保存する。

  • 50 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
developmentapi

Works with

  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add iwasa-kosui/tanteki --skill artifacts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Artifacts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Artifacts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/iwasa-kosui-artifacts-c00c8945/badge)](https://www.skillsdirectory.com/skills/iwasa-kosui-artifacts-c00c8945)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# ファイル取込 Design Doc

## 1. 概要

ファイル取込は非同期処理として実装する。APIは受信したファイルをオブジェクトストレージへ保存し、保存先情報をキューへ登録する。ワーカーはキューから保存先情報を取得し、ファイルを読み込んで解析結果をDBへ保存する。

## 2. 背景・制約

- ファイル本体をキューへ登録する方式は採用しない。
- 10MBのファイルに対して、キューのサイズ上限が1MBであるため。
- 非同期化により、利用者が解析結果を確認するまでの時間は従来より長くなる。

## 3. 処理フロー

### API

1. APIがファイルを受信する。
2. ファイルをオブジェクトストレージへ保存する。
3. 保存先情報をキューへ登録する。
4. 上記が完了したら、受付済みとしてレスポンスを返す。

### ワーカー

1. キューから保存先情報を取得する。
2. 保存先からファイル本体を読み込む。
3. ファイルを解析する。
4. 解析結果をDBへ保存する。

## 4. エラー処理

### オブジェクトストレージへの保存失敗

- APIは503を返す。
- キューには登録しない。

### キューへの登録失敗

回復方法は未決定である。実装前に、再試行、状態管理、運用による復旧などの方針を決定する。キュー登録に失敗した場合は、オブジェクトストレージ上のファイルを孤立させない仕組みも検討する。

## 5. データと責務

- オブジェクトストレージ: 受信したファイル本体を保持する。
- キュー: オブジェクトストレージ上の保存先情報を伝達する。ファイル本体は保持しない。
- ワーカー: ファイルの取得、解析、解析結果のDB保存を担当する。
- DB: 解析結果を保存する。

## 6. 実装前の確認事項

- キューへ登録する保存先情報の形式を定義する。
- APIの受付成功レスポンスと結果取得方法を定義する。
- 解析中、解析完了、解析失敗などの処理状態を管理するか決定する。
- キュー登録失敗時の回復方法を決定する。
- 非同期処理によって結果提示が遅れることを利用者へ伝える方法を決定する。

## 7. 今回のスコープ

今週はAPI実装を行う。担当は佐藤。課題およびレビュー状況は、進捗管理資料を参照する。

Files in this skill

  • adr-boundary.1.with_skill.md753 B
  • adr-boundary.1.without_skill.md1.1 KB
  • adr-boundary.2.with_skill.md755 B
  • adr-boundary.2.without_skill.md1.7 KB
  • canonical-reference.1.with_skill.md277 B
  • canonical-reference.1.without_skill.md286 B
  • canonical-reference.2.with_skill.md312 B
  • canonical-reference.2.without_skill.md302 B
  • comparison-rfc.1.with_skill.md1.1 KB
  • comparison-rfc.1.without_skill.md1.2 KB
  • comparison-rfc.2.with_skill.md1.3 KB
  • comparison-rfc.2.without_skill.md1.3 KB
  • design-tradeoff.1.with_skill.md3.2 KB
  • design-tradeoff.1.without_skill.md2.5 KB
  • design-tradeoff.2.with_skill.md1.8 KB
  • design-tradeoff.2.without_skill.md5.3 KB
  • incident-record.1.with_skill.md623 B
  • incident-record.1.without_skill.md473 B
  • incident-record.2.with_skill.md599 B
  • incident-record.2.without_skill.md681 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.