OpenClawSkills
GitHub

Base64 エンコーダー

コミュニティ

文字列を Base64 にエンコード/デコードします。

インストール

Save as `base64.js`. Usage: `base64 encode <text>` or `base64 decode <text>`.

ソースコード

JavaScript
Tutorial.terminal

// base64.js

module.exports = async function(context) {
    const mode = context.args[0]; // 'encode' or 'decode'
    const text = context.args.slice(1).join(' ');
    
    if (mode === 'encode') {
        return Buffer.from(text).toString('base64');
    } else if (mode === 'decode') {
        return Buffer.from(text, 'base64').toString('utf-8');
    } else {
        return "Usage: base64 <encode|decode> <text>";
    }
};

プレビュー

● ライブデモ
Agent セッション
セッションを開始中...

使い方

  • 必要な依存関係があれば、事前にインストールします。
  • ファイルを OpenClaw のスキルフォルダ(例:~/.openclaw/skills/)に配置します。
  • エージェントを再起動するか、設定をリロードします。
  • ファイル名(拡張子なし)をツール名として呼び出すか、説明が十分なら自然言語で呼び出します。