一键导入
sharepoint
Use when uploading/downloading files to RI's SharePoint Online sites, updating Excel tracker cells, or normalizing pasted share links.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when uploading/downloading files to RI's SharePoint Online sites, updating Excel tracker cells, or normalizing pasted share links.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Anthropic API rate limit handling - retry logic, backoff, throttling for batch workloads against Claude models
Use when building an automated test → issue → fix loop with Claude Code and GitHub issues — overnight auto-fixing, regression loops, self-healing CI.
Use when creating, editing, publishing, or deleting posts on Cyril's Workshop blog or the steponnopets.net devblog.
Use when writing or contributing a boofuzz network-protocol fuzzer in this repo — layout, formatting rules, and reading results.
Use when a task needs real-time control of a connected browser via the Browser Bridge Broker — submit JS jobs over HTTP that browsers eval and return.
Use when training a character LoRA (Chroma/Flux or Pony/SDXL) on a RunPod GPU and wiring it into the ComfyUI + pony_web render stack.
| name | SharePoint |
| description | Use when uploading/downloading files to RI's SharePoint Online sites, updating Excel tracker cells, or normalizing pasted share links. |
https://tenant.sharepoint.com/sites/RIHub — e.g. /sites/RIHub/External Partners/Customer Service/...https://tenant.sharepoint.com/sites/TradingDepartment — e.g. /sites/TradingDepartment/Trading/SEASONAL/EASTER/tracker.xlsx (drive name Trading, file path within drive SEASONAL/EASTER/Easter 2025/tracker.xlsx)Server-relative URLs always start /sites/....
OpenBinaryStream. Faster for file-heavy work. Auth: new AuthenticationManager().GetACSAppOnlyContext($"https://{host}/sites/{site}", clientId, clientSecret); needs Sites.FullControl.All.ClientSecretCredential(tenantId, clientId, clientSecret) → GraphServiceClient; needs Sites.ReadWrite.All + Files.ReadWrite.All.Credentials (TenantId/ClientId/ClientSecret) live in an external JSON file (azure_ids.json), never in code.
folder.Files.Add(FileCreationInformation) with Overwrite = trueStartUpload / ContinueUpload / FinishUpload in 1MB chunks with a fresh Guid uploadId per session, tracking fileOffset from each call's return valueFolder creation: get folder by server-relative URL; on ServerException with ServerErrorTypeName == "System.IO.FileNotFoundException", walk the path parts creating each level (currentFolder.Folders.Add(part)).
PATCH the workbook range endpoint directly (simpler than the SDK's workbook model):
PATCH https://graph.microsoft.com/v1.0/drives/{driveId}/items/{itemId}/workbook/worksheets/{sheetName}/range(address='N123')
{"values": [["Y"]]}
Worksheet name is case-sensitive; the file must not be open in a browser during updates.
Users paste SharePoint links in several shapes. Normalize before use:
public string FixSharePointLink(string rawLink)
{
string sharepointHost = "https://tenant.sharepoint.com";
// Strip query parameters
string cleanLink = rawLink;
int q = cleanLink.IndexOf('?');
if (q != -1) cleanLink = cleanLink.Substring(0, q);
// Sharing-link redirect format: ...:f:/r/<escaped path>
int marker = cleanLink.LastIndexOf(":f:/r/", StringComparison.OrdinalIgnoreCase);
if (marker != -1)
{
string decodedPath = Uri.UnescapeDataString(cleanLink.Substring(marker + ":f:/r/".Length));
if (!decodedPath.StartsWith("sites/", StringComparison.OrdinalIgnoreCase))
decodedPath = "sites/" + decodedPath;
return $"{sharepointHost}/{decodedPath}";
}
// Library view links: .../Forms/AllItems.aspx?id=<escaped server-relative path>
if (rawLink.Contains("/Forms/AllItems.aspx", StringComparison.OrdinalIgnoreCase))
{
var idParam = rawLink.Replace("?", "&").Split('&')
.FirstOrDefault(p => p.StartsWith("id=", StringComparison.OrdinalIgnoreCase));
if (idParam != null)
return $"{sharepointHost}{Uri.UnescapeDataString(idParam.Substring(3))}";
}
// Direct URL: just decode
if (Uri.TryCreate(rawLink, UriKind.Absolute, out Uri? uri))
return $"{sharepointHost}{Uri.UnescapeDataString(uri.AbsolutePath)}";
return string.Empty;
}
ExecuteQuery() round-trips: ctx.Load(...) several objects, then execute once.GetFileByServerRelativeUrl(url).OpenBinaryStream() → copy to MemoryStream, reset Position = 0 (feed to Aspose.Cells etc.).FileExists(folder, name) before uploading to skip already-uploaded files (catch the FileNotFound ServerException as "no").