Skip to content
Automation
Skill

/file_name_insert_content

在文件名中间指定位置插入字符。当用户提到文件名插入、重命名插入字符时使用。

BOOST
From plugin
python-office
1.4k74 skills
Install
$ npx -y skills add coderwanfeng/python-office --skill file_name_insert_content --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/file_name_insert_content

Context preview

The summary Claude sees to decide when to auto-load this skill.

在文件名中间指定位置插入字符。当用户提到文件名插入、重命名插入字符时使用。

SKILL.md

file_name_insert_content.SKILL.md
name: file_name_insert_content
description: 在文件名中间指定位置插入字符。当用户提到文件名插入、重命名插入字符时使用。

file_name_insert_content Skill

> 批量重命名:在文件名中间插入字符

功能描述

在指定文件的文件名中间指定位置插入新的字符。

所属分类

`office/skills/file/file_name_insert_content/`

调用方式

from skills.file import file_name_insert_content

file_name_insert_content(
    file_path='./test.txt',
    insert_position=2,
    insert_content='_new'
)

参数说明

| 参数 | 类型 | 必填 | 默认值 | 说明 | |------|------|------|--------|------| | `file_path` | str | 是 | - | 文件路径 | | `insert_position` | int | 是 | - | 插入位置 | | `insert_content` | str | 是 | - | 插入的内容 |

返回值

`None`

使用示例

from skills.file import file_name_insert_content
file_name_insert_content(file_path='./report.txt', insert_position=2, insert_content='_2024')

原始函数

`office.api.file.file_name_insert_content`

Ships withpython-office

pip install python-office 自动化办公专用库

Get the whole plugin
Stats
1,358
Stars
303
Forks
Maintained
Maintenance
Python
Language
Apache-2.0
License
1mo ago
Last commit
4y ago
Created
1d ago
Added

Repo: coderwanfeng/python-office

Other skills on python-office.