The story of how convenient it was to turn routine tasks into custom slash commands with Claude Code
ちょっと話題の記事

The story of how convenient it was to turn routine tasks into custom slash commands with Claude Code

2025.12.18

This page has been translated by machine translation. View original

Hello, I'm Kanno from the Consulting Department, and I love supermarkets.

This is day 18 of the Classmethod AI-Driven Development Advent Calendar 2025!

https://adventar.org/calendars/11778

This article is about Claude Code's custom slash commands. While I usually talk about AgentCore, today I'd like to share how custom slash commands can be useful for routine tasks beyond coding, in line with our AI-driven development theme.

Custom Slash Commands

Custom slash commands can be called using /command syntax once defined, allowing you to execute a series of prompts without having to rewrite them each time, enabling AI to perform tasks.

https://code.claude.com/docs/en/skills

Examples often include commands that read code changes and create PRs, but I suddenly thought, "These could be useful for repetitive non-coding tasks too..." which prompted me to write this article.

Prerequisites

This article assumes you have Backlog data locally available.
I use a tool called backlog-exporter to synchronize Backlog data to my local environment.

https://dev.classmethod.jp/articles/backlog-exporter/

This approach should work with other tools as long as you have your communication history stored locally.

I've shared the custom slash commands and sample Backlog project data on GitHub for reference.

https://github.com/yuu551/custom-slash-command-sample

The sample uses Claude Opus 4.5, but I've also created similar commands with Sonnet 4.5, so this should be helpful for those using Sonnet 4.5 as well.

Using Custom Slash Commands to Create Regular Meeting Agendas

Creating agendas for regular meetings can be quite time-consuming, can't it? Even with templates, I found myself manually checking Backlog ticket statuses and entering progress into tables each time.

I thought, "It would be nice if AI could autonomously create agendas by looking at ticket statuses..." and wondered if custom slash commands might be useful for this.

I created the custom slash command by having a conversation with AI.
I barely wrote anything myself. Even my questions were quite casual.

I've been creating regular meeting agendas in the following format.
Could you create a custom slash command that automatically checks ticket status and creates an agenda?

---

# Regular Meeting/YYYYMMDD

## Date
[Date in YYYY/MM/DD (day of week) HH:MM-HH:MM format]

## Purpose
- Share project progress
- Check status of each ticket and identify concerns early
- Clarify action items for next meeting

## Review of Previous Meeting
[Brief description of decisions and important points from previous meeting]

## Current Progress
I would like to report on the progress of each ticket created after kickoff.

### Progress Summary
| Ticket Key | Ticket Name | Status | Assignee | Notes |
| :--- | :--- | :--- | :--- | :--- |
[Ticket information in table format]

### Detailed Status of Each Ticket
[Current status, items to confirm, and next actions for each ticket]

## Questions and Concerns
## Next Meeting Schedule
## Q&A
## Other

## Decisions
## Next Actions

With just one conversation, I was able to create the following custom slash command.
I'll include the full conversation, but I'll collapse it since it's quite lengthy.

Full conversation
⏺ I'll create a custom slash command to automatically generate regular meeting agendas. First, let me check the current project structure and format of existing slash commands.

⏺ Search(pattern: "**/.claude/commands/*.md")
  ⎿  Found 0 files 

⏺ Search(pattern: "**/backlog-data/**/*.md")
  ⎿  Found 7 files (ctrl+o to expand)

⏺ Read(backlog-data/wiki/定例/20251029_定例MTG.md)
  ⎿  Read 93 lines

⏺ Read(backlog-data/issues/2025/SAMPLE-2.md)
  ⎿  Read 147 lines

⏺ Read(backlog-data/issues/2025/SAMPLE-4.md)
  ⎿  Read 151 lines

⏺ Let me check the remaining tickets and format of existing slash commands.

⏺ Read(backlog-data/issues/2025/SAMPLE-8.md)
  ⎿  Read 125 lines

⏺ Read(backlog-data/issues/2025/SAMPLE-10.md)
  ⎿  Read 157 lines

⏺ Read(backlog-data/issues/2025/SAMPLE-11.md)
  ⎿  Read 186 lines

⏺ Read(backlog-data/issues/2025/SAMPLE-24.md)
  ⎿  Read 155 lines

⏺ I'll create a new custom slash command for this project.

⏺ Bash(mkdir -p /Users/xxx/custom-slash/.claude/commands)
  ⎿  (No content)

⏺ Write(.claude/commands/create-meeting-agenda.md)
  ⎿  Wrote 86 lines to .claude/commands/create-meeting-agenda.md                                                         
     # 定例MTGアジェンダ作成
     以下の手順で定例MTGのアジェンダを自動生成してください。
     ## 1. チケット情報の収集
     `backlog-data/issues/2025/` ディレクトリ内の全てのチケットファイル(*.md)を読み込み、以下の情報を抽出してください:
     - 課題キー
     - チケット名(ファイルの1行目のタイトル)
     … +76 lines (ctrl+o to expand)

⏺ I've created the custom slash command.

  Created File

  .claude/commands/create-meeting-agenda.md

  How to Use

  /create-meeting-agenda

  Or, when specifying the date:

  /create-meeting-agenda 2025年11月12日 14:00-15:00

  What the Command Does

  1. Automatic ticket information collection
    - Reads all tickets in backlog-data/issues/2025/
    - Extracts key, title, status, assignee, and latest comments
  2. Previous meeting confirmation
    - Retrieves decisions and next actions from the latest meeting file in backlog-data/wiki/定例/
  3. Agenda file generation
    - Automatically generates a Markdown file in the specified format
    - Prioritizes in-progress tickets
    - Summarizes detailed status of each ticket from latest comments

  Current ticket status (example):
  | Ticket Key | Status |
  |--------------|------------|
  | SAMPLE-2     | Processed   |
  | SAMPLE-4     | Completed       |
  | SAMPLE-8     | Completed       |
  | SAMPLE-10    | In Progress     |
  | SAMPLE-11    | Completed       |
  | SAMPLE-24    | In Progress     |

  When you run the command, it will automatically generate an agenda based on this information.

# 定例MTGアジェンダ作成

以下の手順で定例MTGのアジェンダを自動生成してください。

## 1. チケット情報の収集

`backlog-data/issues/2025/` ディレクトリ内の全てのチケットファイル(*.md)を読み込み、以下の情報を抽出してください:

- 課題キー
- チケット名(ファイルの1行目のタイトル)
- ステータス
- 優先度
- 担当者
- 最新のコメント内容(現状把握のため)

## 2. 前回の定例MTG情報の確認

`backlog-data/wiki/定例/` ディレクトリ内の最新の定例MTGファイルを確認し、以下を把握してください:

- 前回の開催日
- 前回の決定事項
- 前回のネクストアクション

## 3. アジェンダファイルの生成

以下のテンプレートに従って、新しい定例MTGアジェンダを作成してください。

**ファイル名**: `backlog-data/wiki/定例/YYYYMMDD_定例MTG.md`(YYYYMMDD は次回開催日)

**開催日時**: ユーザーに確認するか、$ARGUMENTS に指定がなければ前回から1週間後を提案

```markdown
# 定例/YYYYMMDD

## 開催日
[日付を YYYY年MM月DD日(曜日)HH:MM〜HH:MM 形式で記載]

## 目的
- プロジェクトの進捗状況を共有する
- 各チケットの状況確認と懸念事項の早期発見
- 次回までのアクションアイテムの明確化

## 前回定例のおさらい
[前回の定例で決まった事項や重要なポイントを簡単に記載]

## 現在の進捗状況について
キックオフ後に作成した各チケットの進捗状況をご報告いたします。

### 進捗状況一覧
| チケットキー | チケット名 | ステータス | 担当者 | 備考 |
| :--- | :--- | :--- | :--- | :--- |
[収集したチケット情報を表形式で記載]

### 各チケットの詳細状況
[各チケットについて、最新コメントから現状・確認事項・ネクストアクションを抽出して記載]

## 質問事項や懸念点について
[チケットの内容から懸念点を抽出、または空欄で準備]

## 次回定例の日程について
[次回の日程候補を記載]

## Q&A

## その他

## 決定事項
[会議後に記載]

## ネクストアクション
[会議後に記載]
```

## 生成ルール

1. **ステータスの優先表示**: 「処理中」のチケットを上位に、「完了」のチケットは備考欄に「完了」と記載
2. **詳細状況の記載**: 各チケットの最新コメントから現状を要約し、確認事項やネクストアクションを抽出
3. **前回からの変更点**: 前回の定例から進捗があったチケットは備考欄に変更内容を簡潔に記載
4. **懸念点の抽出**: チケット内のコメントで未解決の確認事項や質問があれば「質問事項や懸念点について」に記載

## 引数

`$ARGUMENTS` には開催日時を指定できます(例: `2025年11月12日 14:00-15:00`

指定がない場合は、前回の定例から1週間後の同じ時間帯を提案してください。

If you include a date in the arguments, it will check the local Backlog status and create a regular meeting agenda for you.
Let's try it out.

Actual Usage

Let's try it with the sample project.
When I run /create-meeting-agenda 20251218, it generates the following agenda:

# 定例/20251218_定例MTG

## 開催日

2025年12月18日(水曜日)14:00〜15:00

## 目的

- プロジェクトの進捗状況を共有する
- 各チケットの状況確認と懸念事項の早期発見
- 次回までのアクションアイテムの明確化

## 前回定例のおさらい

前回(10/29)の定例MTGでは、以下の内容を確認させていただきました。

- ログ監視システム構築の進捗について報告(アラート設定の調整中)
- バックアップ自動化が完了し運用開始
- セキュリティパッチ適用のステージング環境での検証について

**決定事項:**
1. ログ監視システムのアラート通知先をSlackチャンネル「#infra-alerts」に設定
2. セキュリティパッチの本番適用は、ステージング環境での検証完了後に決定

**前回のネクストアクション:**
1. 田中: PROJ-15のアラート閾値について、運用チームとの調整会議を設定
2. 鈴木: PROJ-22のステージング環境での検証を完了させる
3. 田中: ログ監視システムのコスト見積もりを詳細化
4. 全員: 来月のメンテナンスウィンドウの日程調整

## 現在の進捗状況について

キックオフ後に作成した各チケットの進捗状況をご報告いたします。

### 進捗状況一覧

| チケットキー | チケット名 | ステータス | 担当者 | 備考 |
| :--- | :--- | :--- | :--- | :--- |
| SAMPLE-10 | API設計・実装 | 処理中 | 神野 | レポート生成API実装中 |
| SAMPLE-24 | ユーザー移行手順 | 処理中 | 神野 | 11/15移行実施予定 |
| SAMPLE-2 | 認証機能の設計 | 処理済み | 神野 | クローズ判断待ち |
| SAMPLE-4 | データベース移行計画 | 完了 | 神野 | 完了 |
| SAMPLE-8 | UI/UXデザイン | 完了 | 神野 | 完了 |
| SAMPLE-11 | テスト計画 | 完了 | 神野 | 完了 |

### 各チケットの詳細状況

#### SAMPLE-10: API設計・実装

**現状**: レポート生成APIの実装を進めています。現在、パフォーマンス最適化を実施中です。認証API、ユーザー管理API、勤怠管理API(残業申請の承認フロー含む)は実装完了済みです。

**確認事項**: 子チケット(SAMPLE-10-1, SAMPLE-10-2)で詳細な実装を進めています。

**ネクストアクション**: レポート生成APIのパフォーマンス最適化を完了し、本チケットをクローズする。

---

#### SAMPLE-24: ユーザー移行手順

**現状**: 移行スケジュールと通知方法について承認されました。11月15日深夜0時からの移行で進めることが決定しています。

**確認事項**:
- 事前通知(1週間前): 社内メールで通知
- 移行当日: システムメンテナンスのお知らせを表示
- 移行後: 新システムへのログイン方法を案内

**ネクストアクション**: 11月15日の移行実施、移行後の確認を完了させる。

---

#### SAMPLE-2: 認証機能の設計

**現状**: OpenID ConnectでのAzure AD連携による認証機能の実装が完了しました。本番環境への反映も完了し、動作確認も問題なく完了しています。

**確認事項**: クローズ判断が必要です。

**ネクストアクション**: お客様にクローズ判断をいただく。

---

#### SAMPLE-4: データベース移行計画(完了)

**現状**: MySQL 5.7からPostgreSQL 14への移行が完了しました。ダウンタイムは1時間45分で目標時間内に収まりました。

**確認事項**: なし

**ネクストアクション**: 本チケットはクローズ済み。

---

#### SAMPLE-8: UI/UXデザイン(完了)

**現状**: Material Designを採用したUI/UXデザインが確定し、デザインガイドラインのドキュメント化も完了しました。

**確認事項**: なし

**ネクストアクション**: 本チケットはクローズ済み。

---

#### SAMPLE-11: テスト計画(完了)

**現状**: 単体テスト(カバレッジ80%以上)、結合テスト、E2Eテスト、パフォーマンステスト、セキュリティテストすべて完了しました。

**確認事項**: なし

**ネクストアクション**: 本チケットはクローズ済み。

## 質問事項や懸念点について

- SAMPLE-2(認証機能の設計)のクローズ判断が保留となっています。ご確認をお願いいたします。
- SAMPLE-24(ユーザー移行手順)の11月15日移行実施後の状況について確認が必要です。

## 次回定例の日程について

次回の定例MTGは2025年12月25日(水曜日)14:00〜15:00を予定しています。
※クリスマスと重なるため、日程調整が必要であればご相談ください。

## Q&A

## その他

## 決定事項

[会議後に記載]

## ネクストアクション

[会議後に記載]

It generates a good format according to the template for something created from scratch!

Of course, there may be excessive confirmation items and next actions generated, or missed status checks, so caution is necessary. However, I find it very helpful that it creates a template that's about 60-70% complete.
Make sure to review and finalize it with human eyes.

If there are parts of the output you don't like, you can also have a conversation with AI to make corrections.
I usually give feedback in bullet points for corrections.

For example, if you're concerned about overuse of bold text and bullet points, or if completed tickets don't need detailed descriptions, you can write something like this for modifications:

Could you modify the create-meeting-agenda custom slash command?
Here is my feedback:

- Please don't overuse bullet points and bold text
- Completed tickets don't need to be included in the detailed status section
- For Q&A and Other sections, I'd like to include a line saying "I'm happy to answer any questions" rather than leaving them blank

The output might not be perfect after creating it just once, so it's good to give AI feedback and repeatedly improve it over time.

Other Examples I've Tried

Recently, I've been increasingly using Marp, a library for creating slides with Markdown.
I've been using the Classmethod template design created by Mr. Toda.

https://dev.classmethod.jp/articles/classmethod-marp-theme/

However, I found it tedious to clone the template repository, set it up, and format it each time I needed to create slides.
So I also turned this process into a custom slash command.

create-slide.md
---
description: Create a new slide from Marp template [topic] [filename]
---

Please create a new slide using sample-slide.md from the Classmethod Marp theme as a template.

Execution procedure:
1. Check the classmethod-marp-theme repository
   - Verify if ./classmethod-marp-theme exists
   - If it doesn't exist, clone https://github.com/classmethod/classmethod-marp-theme.git to the current directory
2. Check sample-slide.md in the classmethod-marp-theme repository
3. Understand the template structure and format
4. Generate slide content based on the topic specified by the user (from arguments or prompt)
5. Create a new slide file (filename specified by user or an appropriate default name)
6. Report the path of the created slide file

Arguments:
- First argument: Slide topic/theme (if omitted, confirm with user)
- Second argument: Output filename (if omitted, use an appropriate name like "slide.md")

Notes:
- Correctly reference the Classmethod theme CSS path
- Maintain the structure and metadata format from sample-slide.md

This command is also useful for quickly creating draft materials by researching with something like AWS Knowledge MCP Server.

/create-slide Research S3 security with AWS Knowledge MCP Server and create materials

Here's the slide that was created:

Full slide content
---
marp: true
theme: classmethod
paginate: true
title: Amazon S3 Security Best Practices
description: Comprehensive guide to S3 security researched with AWS Knowledge MCP Server
---

<!-- _class: title -->
<!-- _paginate: false -->

![classmethod-logo w:400px](https://classmethod.jp/wp-content/themes/cmn/assets/images/common/logo_classmethod.svg)

# Amazon S3 Security Best Practices

2024/12/16 AWS Knowledge MCP Server Research Materials

---

<!-- _class: section -->
<!-- _paginate: false -->

## S3 Security Overview
Multi-layered defense approach for data protection

---

# Three Pillars of S3 Security

Amazon S3 security consists of three pillars:

## 1. **Access Control**
- IAM policies, bucket policies, ACLs (not recommended)

## 2. **Data Protection**
- Encryption at rest, encryption in transit

## 3. **Monitoring & Auditing**
- CloudTrail, S3 server access logs, AWS Config

---

<!-- _class: section -->
<!-- _paginate: false -->

## Access Control
Implementing the principle of least privilege

---

# Disable ACLs

Using S3 Object Ownership to disable ACLs is recommended

## Why disable ACLs?

- ACLs are unnecessary for modern use cases
- Policy-based access control is simpler and easier to manage
- Objects uploaded from different AWS accounts can be centrally managed

## Recommended setting

```
Bucket owner enforced
```

ACLs are disabled by default for new buckets

---

# S3 Block Public Access

Settings to reliably block public access

## Four blocking settings

| Setting | Description |
|------|------|
| BlockPublicAcls | Blocks addition of public ACLs |
| IgnorePublicAcls | Ignores existing public ACLs |
| BlockPublicPolicy | Blocks addition of public policies |
| RestrictPublicBuckets | Restricts public access |

## Best practices

- Enable all blocking settings at the **account level**
- Can be applied across the entire **organization** using AWS Organizations

---

# Principle of Least Privilege

Grant only the minimum necessary access permissions

## Implementation methods

- **IAM policies**: Permissions for users/roles
- **Bucket policies**: Resource-based permissions
- **VPC endpoint policies**: Control access via VPC
- **SCPs/RCPs**: Organization-level permission boundaries

## Check points

```json
// Examples to avoid
"Principal": "*"           // Anyone can access
"Action": "s3:*"          // All actions allowed
```

---

# Using IAM Roles

Use temporary credentials instead of long-term credentials

## Why use IAM roles?

- Eliminates risk of access key leakage
- Automatic credential rotation
- Secure S3 access from EC2, Lambda, ECS, etc.

## Anti-patterns

- Hardcoding credentials in application code
- Placing access keys on EC2 instances

---

<!-- _class: section -->
<!-- _paginate: false -->

## Data Protection
Multi-layered defense through encryption

---

# Encryption at Rest (Server-Side Encryption)

All new objects are encrypted by default since January 5, 2023

## Encryption options

| Option | Description | Use case |
|-----------|------|-------------|
| **SSE-S3** | S3-managed keys | Default setting |
| **SSE-KMS** | KMS-managed keys | Audit & fine-grained control |
| **DSSE-KMS** | Double encryption | Advanced compliance |
| **SSE-C** | Customer-provided keys | Special requirements only (not recommended) |

## Notes

- SSE-C will be disabled by default after April 2026
- SSE-KMS is effective for cross-account access

---

# Encryption in Transit

Enforce HTTPS (TLS) to protect data

## Force HTTPS with bucket policy

```json
{
  "Condition": {
    "Bool": {
      "aws:SecureTransport": "false"
    }
  },
  "Effect": "Deny"
}
```

## Supported TLS versions

- TLS 1.2 and TLS 1.3
- Post-quantum cryptography (ML-KEM) also supported

---

<!-- _class: section -->
<!-- _paginate: false -->

## Enhanced Data Protection
Prevent accidental deletion and tampering

---

<!-- _class: content-image-right content-60 -->

# S3 Versioning

Keep multiple versions of objects

![w:400px](https://d1.awsstatic.com/product-marketing/S3/S3_Object-Versioning.d8d66a47f24fb6bf9d51a2bf40c9e87a62ae0dd8.png)

## Benefits

- Recovery from accidental deletion
- Restoration of overwritten data
- Recovery from application errors

## AWS Config Rule

```
s3-bucket-versioning-enabled
```

---

# S3 Object Lock

Protect data with WORM (Write Once Read Many) model

## Retention modes

| Mode | Description |
|--------|------|
| **Governance** | Can be deleted with specific IAM permissions |
| **Compliance** | Cannot be deleted by anyone (even root user) |

## Use cases

- Protecting CloudTrail logs
- Meeting compliance requirements
- Ransomware protection

---

<!-- _class: section -->
<!-- _paginate: false -->

## Network Security
Protection using VPC endpoints

---

# Using VPC Endpoints

Access S3 without going through the internet

## Benefits

- No traversal of public internet
- Prevention of data exfiltration
- VPC endpoints can be specified in bucket policies

## Bucket policy example

```json
{
  "Condition": {
    "StringNotEquals": {
      "aws:SourceVpce": "vpce-1234567890abcdef0"
    }
  },
  "Effect": "Deny"
}
```

---

<!-- _class: section -->
<!-- _paginate: false -->

## Monitoring and Auditing
Detecting security incidents

---

# Auditing with CloudTrail

Record and monitor API calls to S3

## Recorded information

- Who: IAM user/role
- What: API action executed
- When: Timestamp
- Where: Source IP address

## Important actions to monitor

```
PutBucketPolicy, PutBucketAcl,
PutObjectAcl, DeleteBucket,
PutBucketWebsite
```

---

# S3 Server Access Logs

Detailed recording of requests to buckets

## Recorded content

- Source IP of request
- Requested object
- HTTP status code
- Error information

## AWS Config Rule

```
s3-bucket-logging-enabled
```

Can be used for security auditing and cost analysis

---

<!-- _class: column-layout -->

# Utilizing AWS Managed Services

<div class="column">

## Amazon Macie

- Automatic sensitive data discovery
- PII identification
- Data classification

</div>

<div class="column">

## AWS Security Hub

- Security configuration evaluation
- Compliance checks
- Centralized visualization

</div>

<div class="column">

## Amazon GuardDuty

- Threat detection
- Anomalous access detection
- S3 protection features

</div>

---

<!-- _class: section -->
<!-- _paginate: false -->

## Summary
S3 Security Checklist

---

# S3 Security Checklist

## Access Control
- [ ] Disable ACLs (Bucket owner enforced)
- [ ] Enable S3 Block Public Access
- [ ] Apply least privilege IAM policies
- [ ] Use IAM roles (instead of access keys)

## Data Protection
- [ ] Encrypt with SSE-S3 or SSE-KMS
- [ ] Enforce HTTPS (aws:SecureTransport)
- [ ] Enable S3 Versioning
- [ ] Apply S3 Object Lock for important data

---

# S3 Security Checklist (continued)

## Network
- [ ] Consider using VPC endpoints
- [ ] Restrict VPCs in bucket policies

## Monitoring & Auditing
- [ ] Record data events in CloudTrail
- [ ] Enable S3 server access logs
- [ ] Continuous monitoring with AWS Config rules
- [ ] Detect sensitive data with Amazon Macie

---

<!-- _class: all-text-center align-center -->

![w:450px](https://classmethod.jp/wp-content/themes/cmn/assets/images/common/logo_classmethod.svg)

# Thank You for Your Attention

Reference: AWS Official Documentation "Security best practices for Amazon S3"

While the content may need review and corrections, it's formatted according to the Classmethod template and seems usable as a slide draft.
Of course, you can run it with arguments for your own research or documents you want to turn into slides.

I find it very helpful that a single command can create the base for work I used to do manually.

What to Turn into Custom Slash Commands

Are there tasks that you find a bit tedious but do the same way each time?
Meeting minutes, ticket creation, format conversion... there may be more efficiency opportunities hiding in plain sight.

While it might seem like extra work to create commands at first, it's worth considering for tasks you'll repeat in the near future. There's an initial cost, but if you create them through conversation with AI, it doesn't take much effort to get a decent output for improved efficiency. After that, you can continuously improve the accuracy through feedback.

Another benefit of custom slash commands is that if you have a group performing the same routine tasks, you can share these commands via GitHub or distribute them through the Plugin feature on the Plugin Marketplace. This allows everyone to use the same custom slash commands, standardizing prompts, and ensuring relatively consistent output quality across the entire group when using the same model.

It's satisfying when a command you created helps improve efficiency across an entire team.

Conclusion

In this article, I explored using custom slash commands for routine tasks beyond coding.

I found that tasks like creating regular meeting agendas, which involve organizing information in the same format repeatedly, work well with custom slash commands. While they don't produce perfect results, they're certainly easier than creating everything from scratch.

Using AI in this way is convenient, but taking that first step can feel challenging. I hope this article has inspired you to try using custom slash commands! Thank you for reading to the end!

Share this article

FacebookHatena blogX

Related articles