SkillAgentSearch skills...

aws-content-relay-hub

AWS関連の技術記事をここに掲載します。Qiita、Zenn、X-Engineerにも同時投稿する予定です。

Install / Use

npx skills add riadraz/aws-content-relay-hub

Installs into whichever agent you are using.

About this skill
📦

Amazon Q Rules

Amazon Q Developer rules

Quality Score

59/100

Supported Platforms

Amazon Q

Our assessment of aws-content-relay-hub

aws-content-relay-hub scores 59/100 on our quality scale, 4165th of 4,604 Development & Engineering skills we index.

Its Amazon Q Rules is 5.2 KB long, well organised into 21 sections with 7 code examples: a solid amount of guidance for an agent.

It has no GitHub stars yet, so there is no community track record; judge it on its content.

Substance
26/30
Structure
20/20
Description
8/15
Adoption
0/20
Freshness
5/15

Maintenance, license and trust

  • We could not determine when the repository was last updated.
  • Our last check on 2026-09-02 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

aws-content-relay-hub compared with similar skills

All 4 of these similar skills score higher than aws-content-relay-hub; compare them before choosing.

SkillScoreStarsUpdatedFormat
aws-content-relay-hub (this skill)by riadraz590—Amazon Q Rules
taste-skillby Leonxlnx100102.7ktodayCLAUDE.md
ai-job-searchby ai-job-search-dev10066.0k5d agoCLAUDE.md
claude-howtoby luongnv8910045.2k6d agoCLAUDE.md
algorithmic-artby anthropics100177.9k33d agoSKILL.md

Frequently asked questions

How do I install aws-content-relay-hub?
Run npx skills add riadraz/aws-content-relay-hub. The install tabs above show the steps for each supported agent.
Which AI agents does aws-content-relay-hub work with?
It is written for Amazon Q, as a Amazon Q Rules file. Other agents that read the same format can often use it too.
Is aws-content-relay-hub safe to use?
It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is aws-content-relay-hub still maintained?
We could not determine when the repository was last updated.

Development Guidelines

Code Quality Standards

Error Handling

  • Fail fast on missing required env vars at module load time: if (!TOKEN) throw new Error("TOKEN is not set")
  • Use throw (not console.error + return) inside async functions for fatal errors
  • Wrap top-level async calls with .catch(e => { console.error(e); process.exit(1) })
  • Use try/catch only for recoverable errors (e.g. 404 on file-existence check); let unrecoverable errors propagate
  • Non-fatal missing inputs exit with code 0 + console.log message (e.g. no files passed to sync script)

TypeScript Conventions

  • Strict mode enabled — no implicit any, always type function parameters and return values
  • Define local type aliases for frontmatter shapes (not interface):
    type Frontmatter = { title: string; tags?: string[]; private?: boolean };
    
  • Use meta: any only during dynamic YAML parsing, then cast to the typed alias immediately
  • Prefer ?? (nullish coalescing) over || for boolean defaults: meta.private ?? false
  • Use as Frontmatter cast at the return boundary, not inline during construction

Module Style

  • All files use ESM (import/export), no CommonJS require()
  • "type": "module" in package.json — applies to .js files too
  • Import Node built-ins without node: prefix: import fs from "fs"

Structural Conventions

Script Architecture

Each script is a self-contained CLI entry point:

  1. Import dependencies
  2. Validate env vars / argv at top level (fail fast)
  3. Define pure helper functions (e.g. parseFrontmatter)
  4. Define one primary async function named after the operation (e.g. postToQiita, updateQiita, syncFileToRepo)
  5. Parse process.argv[2] for the article path
  6. Call the primary function and attach .catch handler

Frontmatter Parser Pattern

Both Qiita scripts share an identical inline frontmatter parser — no shared utility module. Pattern:

function parseFrontmatter(raw: string): { meta: Frontmatter; body: string } {
  const match = raw.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
  // parse key:value lines, handle arrays [], booleans, strip quotes
  return { meta: meta as Frontmatter, body: match[2].trim() };
}
  • qiita-post.ts returns null on missing frontmatter (soft skip)
  • qiita-update.ts throws on missing frontmatter (hard fail)

Qiita API Calls

Always append an attribution footer to the article body before posting:

const qiitaBody = body + `\n\n---\n> この投稿は GitHub リポジトリ "aws-content-relay-hub" から自動投稿されています。\n`;

Use node-fetch with explicit Authorization: Bearer header and Content-Type: application/json.

Mirror Sync Pattern (Octokit)

// 1. Try GET to retrieve existing file SHA
// 2. PUT with sha if exists (update), without sha if new (create)
await octokit.request("PUT /repos/{owner}/{repo}/contents/{path}", {
  owner, repo, path: targetPath,
  message: `Sync JP article: ${filename}`,
  content: base64Content,
  sha  // undefined = create, string = update
});

Mapping Format

Mirror repo targets use owner/repo:/destination-path format, newline-separated:

riadraz/x-engineer:/docs/

Parsed by splitting on \n, then splitting each line on : and /.

  • Dest path must have leading / stripped before passing to Octokit — GitHub API rejects paths starting with /
  • Strip with: dest.replace(/^\//, "").replace(/\/$/, "")

Naming Conventions

  • Script files: kebab-case with operation prefix (qiita-post, qiita-update, sync-mirror-repos)
  • Article files: kebab-case with -en or -ja language suffix
  • Functions: camelCase, verb-first (postToQiita, updateQiita, syncFileToRepo, parseFrontmatter)
  • Constants: SCREAMING_SNAKE_CASE for env var references (QIITA_TOKEN, GH_TOKEN)

CI/CD Patterns

File Detection (Two-Stage)

# Stage 1: event payload (reliable for incremental pushes)
CHANGED=$(jq -r '.commits[].modified[], .commits[].added[]' "$GITHUB_EVENT_PATH" | grep '\-ja.md$' | tr '\n' ' ' || true)

# Stage 2: fallback for first-time publish
CHANGED=$(git ls-files "articles/*-ja.md" | tr '\n' ' ' || true)
  • Always pipe through tr '\n' ' ' to produce space-separated list — required for for file in $FILES loop and node call
  • Both stages append || true to prevent non-zero exit killing the step

Qiita Rate Limits

  • Qiita API allows ~50 calls/day on free plan
  • Add sleep 2 between posts in the workflow loop to avoid 429 errors
  • qiita-post.ts skips articles where qiita_id is already set in frontmatter
  • After first successful post, update qiita_id in the article frontmatter with the ID from the Qiita URL

Secret Usage

  • QIITA_TOKEN — scoped to Qiita post/update steps only
  • GH_TOKEN — GitHub PAT with repo scope, required for cross-repo writes; auto-injected GITHUB_TOKEN only works on the current repo
  • Never log token values; scripts only reference via process.env

Config File Conventions

mapping.yml

articles:
  filename.md:
    qiita_id: null        # null = not yet posted; string = Qiita article ID
    zenn_slug: some-slug

platforms.yml

qiita:
  enabled: true
mirror_repos:
  - name: repo-name
    owner: github-username
    target_path: content/posts

Related Skills

View on GitHub
GitHub Stars0
CategoryDevelopment
UpdatedNaNy ago
Forks0

Trust signals

68/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

2 medium1 low
aws-content-relay-hub — Amazon Q Rules: Install & Safety Check | SkillAgent