A story about how it was convenient to make frequently performed routine tasks into Claude Code custom slash commands
ちょっと話題の記事

A story about how it was convenient to make frequently performed routine tasks into Claude Code custom slash commands

2025.12.18

This page has been translated by machine translation. View original

Hello, I'm Jinno 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 introduce how custom slash commands can be useful for routine tasks beyond coding, in keeping with our AI-driven development theme.

Custom Slash Commands

Custom slash commands are a feature that allows you to call a command like /command, loading a predefined set of prompts for the AI to execute tasks without having to write the same prompt each time.

https://code.claude.com/docs/ja/slash-commands#カスタムスラッシュコマンド

Commands that read source code changes and create PRs are commonly cited examples, but I suddenly thought, "This could be used for repetitive tasks beyond coding..." which inspired this article.

Prerequisite

This article assumes that Backlog data is available locally.
I use a tool called backlog-exporter to synchronize Backlog data locally.

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

I believe similar approaches could work with other tools as long as you have local access to your conversation history.

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

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

The model I used for the sample is Claude Opus 4.5, but I've also created similar commands with Sonnet 4.5, so this should be helpful for creating with Sonnet 4.5 as well.

Using Custom Slash Commands to Create Regular Meeting Agendas

Don't you find that creating regular meeting agendas can be time-consuming? Even with templates, I was constantly visually checking ticket statuses in Backlog and recording progress in tables.

I thought, "It would be great if AI could autonomously create agendas by looking at ticket status..." and wondered if custom slash commands might be useful for this, so I tried it out.

I created the custom slash command by brainstorming with AI.
I barely wrote anything myself. My questions were quite vague.

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 the next meeting

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

## Current Progress Status
I'd like to report on the progress of tickets created after kickoff.

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

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

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

## Decisions
## Next Actions

Based on previous regular meeting wikis and tickets, a custom slash command was created in one shot.
I'll include the entire conversation, but I'll collapse it to avoid making it too difficult to read.

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

⏺ 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 existing slash command format.

⏺ 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 a custom slash command.

  Created file

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

  How to use

  /create-meeting-agenda

  Or, to specify the date:

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

  What the command does

  1. Automatic collection of ticket information
    - Reads all tickets in backlog-data/issues/2025/
    - Extracts ticket key, title, status, assignee, latest comment
  2. Checking previous regular meetings
    - Gets decisions and next actions from the latest regular meeting file in backlog-data/wiki/定例/
  3. Agenda file generation
    - Automatically generates a Markdown file in the specified format
    - Prioritizes tickets in progress
    - 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 execute the command, an agenda will be automatically generated 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週間後の同じ時間帯を提案してください。

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

Trying it out

Using the sample project as an example.
When I execute /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 creates a pretty good output following the format, especially considering it was created from scratch!

Of course, you need to be careful as it may generate excessive confirmation items and next actions, or miss checking some status. However, I find it very helpful that it creates about 60-70% of the template for me.
Always make sure to review and finalize with human eyes at the end.

If there are parts of the output you don't like, you can also discuss and have them corrected by the AI.
I usually give feedback in a simple bullet-point format for corrections.

For example, if I'm concerned about excessive use of bold text and bullet points, or if I don't need details on completed tickets, I might write something like this for corrections:

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

- Please don't use excessive bullet points and bold text
- We don't need to include completed tickets in the detailed status section
- For Q&A and Other sections, please include text like "I'm available to answer any questions" instead of leaving them blank

The output might not be great after creating it just once, so it's good to have a mindset of giving feedback to the AI and iteratively improving it through use.

Other examples I've tried

Recently, I've been increasingly using a library called Marp to create slides in 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 every time I needed to create a slide.
So I turned this process into a custom slash command as well.

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

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

Execution steps:
1. Check the classmethod-marp-theme repository
   - Check 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 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 of sample-slide.md

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

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

Here's what the resulting material looks like:

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 -->

## Overview of S3 Security
Multi-layered approach to data protection

---

# Three Pillars of S3 Security

Amazon S3 security consists of the following 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

Recommended to disable ACLs using S3 Object Ownership

## Why disable ACLs?

- ACLs are unnecessary for modern use cases
- Policy-based access control is simpler and easier to manage
- Enables centralized management of objects uploaded from different AWS accounts

## Recommended setting

```
Bucket owner enforced
```

ACLs are disabled by default for new buckets

---

# S3 Block Public Access

Settings to reliably block public access

## Four block settings

| Setting | Description |
|------|------|
| BlockPublicAcls | Block addition of public ACLs |
| IgnorePublicAcls | Ignore existing public ACLs |
| BlockPublicPolicy | Block addition of public policies |
| RestrictPublicBuckets | Restrict public access |

## Best practices

- Enable all block settings at the **account level**
- Can be applied to the **entire organization** with AWS Organizations

---

# Principle of Least Privilege

Grant only the minimum required 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
// Settings to avoid
"Principal": "*"           // Anyone can access
"Action": "s3:*"          // Allow all actions
```

---

# Using IAM Roles

Use temporary credentials instead of long-term credentials

## Why use IAM roles?

- Eliminate the risk of access key leakage
- Automatic credential rotation
- Secure access to S3 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

## Enforce 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
Preventing accidental deletion and tampering

---

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

# S3 Versioning

Maintain 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 (including root user) |

## Use cases

- Protection of CloudTrail logs
- Meeting compliance requirements
- Ransomware protection

---

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

## Network Security
Protection with VPC endpoints

---

# Utilizing VPC Endpoints

Access S3 without traversing the internet

## Benefits

- No traversal of public internet
- Prevention of data exfiltration
- Can specify VPC endpoints in bucket policies

## Example bucket policy

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

---

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

## Monitoring and Auditing
Detection of security incidents

---

# Auditing with CloudTrail

Record and monitor API calls to S3

## Information recorded

- 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 information

- 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 -->

# Using AWS Managed Services

<div class="column">

## Amazon Macie

- Automatic detection of sensitive data
- PII identification
- Data classification

</div>

<div class="column">

## AWS Security Hub

- Evaluation of security settings
- Compliance checks
- Centralized visibility

</div>

<div class="column">

## Amazon GuardDuty

- Threat detection
- Detection of abnormal access
- 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 to important data

---

# S3 Security Checklist (continued)

## Network
- [ ] Consider using VPC endpoints
- [ ] Restrict VPC 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 there may be areas that need checking or correction, it's formatted as a Classmethod slide and looks like a good draft to work with.
Of course, you can also pass your own research or documents you want to turn into slides as arguments.

I appreciate how a command can now create the foundation for tasks I used to do myself.

What to turn into custom slash commands

Are there cases where you find yourself doing the same slightly tedious tasks repeatedly?
Creating meeting minutes, creating tickets, format conversions, etc... there may be efficiency opportunities hiding in plain sight.

It might feel time-consuming to create commands at first, but for tasks you'll repeat in the foreseeable future, creating custom slash commands to improve efficiency could be worth considering. The initial investment might take some time, but if you work with AI to create them, it's not too troublesome and can produce decent output for efficiency gains. After that, continuous feedback will help improve accuracy.

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

It would be gratifying if commands you create help improve efficiency across the entire group.

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 each time, work well with custom slash commands. While they don't produce perfect results, they're definitely easier than creating from scratch.

While using AI in this way is convenient, taking that first step can be daunting. I hope this article inspires you to try out custom slash commands! Thank you for reading to the end!

Share this article

FacebookHatena blogX

Related articles